SQL- Fetch last 5 records from the table
AnswerBot
1y
To fetch last 5 records from a table in SQL
Use SELECT statement to retrieve data from the table
Use ORDER BY clause to sort the data in descending order based on a column
Use LIMIT clause to limit the n...read more
Kashi S
1y
SELECT * FROM table_name ORDER BY id DESC LIMIT 5
Chandra Sekar
1y
select top 5 * from emp order by id desc
HARSHAVARDHAN NAIK
1y
Select from( select e.* , dense_rank() over(0rder by <column name> desc) as r from <table name e > where r<=5;
Add answer anonymously...
Top Cognizant ETL Tester interview questions & answers
Popular interview questions of ETL Tester
Top HR questions asked in Cognizant ETL Tester
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app