How do you retrieve the last N records from a table?
Answer Posted / rajat
SELECT * FROM EMP A
WHERE ROWID NOT IN
(SELECT ROWID FROM RAJ WHERE ROWNUM<=(SELECT COUNT(1) FROM RAJ )-10);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is cold data?
Can we create index on primary key?
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
What are the different ways to optimize a sql query?
What is sqlerrm?
Can we join more than 2 tables in sql?
What is a trigger word?
how is myisam table stored? : Sql dba
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
What do you mean by dbms? What are its different types?
How to use boolean type in select statement?
What is the need of merge statement?
What are the types of sql commands?
How do I view a sql trace file?
How will you distinguish a global variable with a local variable in pl/sql?