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 / alok narayan
Rownum assigned at the runtime on the basis of rownum you
not fetch last three records.
for no records output: Rownum always use <= or >= , if use
rownum < or > its giving no output.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is db journal file?
What is the use of function in sql?
Enlist the characteristics of pl/sql?
Explain the working of primary key?
What is snowflake sql?
what are all the common sql function? : Sql dba
What is column?
What are the properties of a transaction?
What is sql query limit?
Explain what is rdbms?
how to create a new table in mysql? : Sql dba
What is trigger and how to use it in sql?
Is natural join and inner join same?
How do I view a procedure in sql?
What is function and procedure?