How to retrieve first and last records from a table?
Answer Posted / naveen
SELECT * FROM EMP WHERE ROWID IN(SELECT MIN(ROWID) FROM EMP)
UNION ALL
SELECT * FROM EMP WHERE ROWID IN(SELECT MAX(ROWID) FROM EMP);
Is This Answer Correct ? | 22 Yes | 0 No |
Post New Answer View All Answers
How do I escape a reserved word in oracle?
Can we create trigger on materialized view in oracle?
Why do we need integrity constraints in a database?
How do I limit the number of rows returned by an oracle query after ordering?
what is the dual table in oracle?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
What to do if the startbd.bat failed to start the xe instance?
What is bulk copy or bcp in oracle?
How to rebuild an index in oracle?
What is oracle used for?
What is the order of defining local variables and sub procedures/functions?
what's query optimization and without use of IN AND Exist can we get another way data from query
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
What is the difference between view and materialized view in Oracle?
Explain cascading triggers.