Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    55

    Unanswered: How to select the top 10 rows from a table

    Hello all,

    I know you can select the top 10 records from a table in SQL server with the following:

    select top 10 *
    from tb123

    Is there a similar command in DB2?

    Thanks!

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    select * from tb123 fetch first 10 rows only

    Andy

  3. #3
    Join Date
    Apr 2008
    Posts
    39
    SELECT * FROM <table name>
    FETCH FIRST N ROWS ONLY


    Thanks
    Madhavi.

  4. #4
    Join Date
    Aug 2008
    Posts
    55
    Thank you both !

Posting Permissions

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