Clicky
Skip to Content
Custom Search

Reply to comment

Anonymous

 

I Know there is a command in SQL to fetch first n rows only
 
For example:-
 
SELECT Employee_no, Salary FROM Employee-table
WHERE Salary > 10000
FETCH FIRST 10 ROWS ONLY
 
The above query will fetch first 10 rows from Employee-table
 
But if I have to fetch last 10 rows from a table, I tried using 
 
 
 "FETCH LAST 10 ROWS only"
 
 
But this command gave me error 
 
SQLCODE" data-scaytid="1">SQLCODE = -104, ERROR:  ILLEGAL SYMBOL "LAST". SOME SYMBOLS THAT
MIGHT BE LEGAL ARE: FIRST                                       

Reply

  • Allowed HTML tags:
      1. Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Navigation

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Number of Registered users 975
Theme by Dr. Radut.