how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.

Answer Posted / ramareddy

u don't use minum operator to count(*) in subquerry

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql analyzer?

759


Can dml statements be used in pl/sql?

775


What is parameter substitution in sql?

755


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

850


How to select all records from the table?

804






What is a nested table in word?

705


what is timestamp in mysql? : Sql dba

742


Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql

747


Why do we need sharding?

730


What is view explain with example?

686


Explain the advantages and disadvantages of stored procedure?

853


What is a recursive join sql?

806


What is materialized view. What are different methods of refresh?

1068


Does pl sql work in mysql?

687


What is sqlerrd?

699