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 / pavithra
select * from emp where rowid in(select rowid from emp
where rownum<=&upto minus select rowid from emp where
rownum<&start)
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How many types of tables are there?
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
How do you select unique values in sql?
What type of database is sql?
What is the difference between a database and a relational database?
How to pipe multiline string to isql?
How do you modify a table in sql?
What is mutating error in pl sql?
Which command is used to call a stored procedure?
How long will it take to learn pl sql?
Do ddl statements need commit?
Explain the difference between sql and mysql.
Is oracle and sql same?
Does varchar need length?
How to return an array from java to pl/sql?