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 the difference between row level and statement level trigger?
How do I sort a table in sql?
What is the sql case statement?
What steps server process has to take to execute an update statement?
What is a system versioned table?
How can we make an if statement within a select statement?
What is column?
how to add a new column to an existing table in mysql? : Sql dba
Can two tables have same primary key?
How to convert comma separated string to array in pl/sql?
what is “go” in t-sql? : Transact sql
What is pl sql in oracle?
What is benefit of creating memory optimized table?
What are data types in pl sql?
How long it takes to learn pl sql?