query to retrieve middle row of a table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sushanta123
    New Member
    • Oct 2008
    • 3

    query to retrieve middle row of a table

    I want to retrieve the middle row of a table..but i am not sure of any query in DB2 and is there any function to retreive the row number..if yes plz explain with an example.


    Thanx in advance
    Sushanta
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Have a read at the
    FETCH FIRST n ROWS clause.
    You can also use the ROW_NUMBER() function depending on your version.

    Comment

    Working...