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

Which is faster joins or subqueries?

552


what is unique key constraint? : Sql dba

564


how can we optimize or increase the speed of a mysql select query? : Sql dba

504


Why query optimization is needed?

513


Which certification is best for sql?

534






What is cartesian join in sql?

557


Is it important to partition hard disk?

531


Explain the difference between drop and truncate commands in sql?

527


What is the default isolation level in sql server? : Transact sql

564


What is pragma in pl sql?

595


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

644


Do we need to create index on primary key?

462


What are the possible values that can be stored in a boolean data field?

513


How do you declare a user-defined exception?

526


What is a unique constraint?

606