DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: < > Question

  1. #1
    Join Date
    Apr 2003
    Posts
    8

    < > Question

    Say there's a line that says "WHERE salary IS NULL and ROWNUM < 5"

    Question: Does this start at zero and count up to five, or does it start at 1 and count to 5?
    Does this return 4 rows or 5?

  2. #2
    Join Date
    May 2002
    Posts
    2,645

  3. #3
    Join Date
    Apr 2003
    Posts
    8
    I have no way of testing this question right now. Help?

  4. #4
    Join Date
    Apr 2003
    Posts
    8
    Stecal, Thank You very much! I was unsure whether or not the count started at one or zero. This is what I understood ROWNUM to be, but since it was generated by Oracle didn't know the count start.

    'ROWNUM' is actually a pseudo-column generated by Oracle that indicates the order in which the data was returned. The value of the pseudo-column is not physically stored anywhere but only generated as the result set is generated.

Posting Permissions

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


Click Here to Expand Forum to Full Width