Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: How to declare variables

    Wat r the possible ways in which we can declare variables in stored procedure for ex can i declare a variable in if block's begin block.....

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: How to declare variables

    Originally posted by karansplash
    Wat r the possible ways in which we can declare variables in stored procedure for ex can i declare a variable in if block's begin block.....
    You can nest DECLARE/BEGIN/END anywhere in your code, if it is helpful to do so:

    Code:
    ...
    BEGIN
    ...
      IF x = 1 THEN
         DECLARE
            y NUMBER;
         BEGIN
            ...
         END;
         ...
      END IF;
      ...
    END;

  3. #3
    Join Date
    Jan 2004
    Posts
    3

    Thanks

    Thanks a lot freinds......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •