Aug 11, 2001 #1 wuwang Programmer Joined May 16, 2001 Messages 48 Location US Hello, I need to grad the first 50 records from a table base on primary key. Is there any function in SQL or SQL*Plus doing this? Thanks you for your help. Jimmy
Hello, I need to grad the first 50 records from a table base on primary key. Is there any function in SQL or SQL*Plus doing this? Thanks you for your help. Jimmy
Aug 12, 2001 #2 carp MIS Joined Sep 16, 1999 Messages 2,622 Location US SELECT * FROM (SELECT * FROM my_table ORDER BY your_primary_key_column ASC) WHERE rownum < 51; Upvote 0 Downvote