How do you retrieve the last N records from a table?
Answer Posted / jyoti
We can retrieve last N records using Order by clause in the
query.
The ORDER BY clause using DESC
then give limits 0,N
for ex: SELECT * from table_name OREDER BY id DESC limit 0,10
It will return you last 10 records of the table.
Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
Explain the savepoint statement.
what are all different types of collation sensitivity? : Sql dba
Why is normalization important?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
Compare sql & pl/sql
Explain what is rdbms?
What is pl/sql table? Why is it used?
Does sql require a server?
what is the difference difference between procedure and packages
How to get each name only once from an employee table?
What are the different type of joins in sql?
Does truncate require commit?
How do I tune a sql query?
Is grant a ddl statement?
What is composite primary key in sql?