How to retrieve first and last records from a table?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / girija.112
select *
from employees
where rowid = (select max(rowid)
from employees)
or rowid =(select min(rowid)
from employees)
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / avnish srivastava-test engg fc
select* from employees where rowid=(select min(rowid) from
employees)
union
select* from employees where rowid=(select max(rowid) from
employees)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ganesh
hi Avnish Srivastava-test Engg Fc
plssssssss can u send the data base testing material
my mail id.... gan9000@gmail.com
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / reddy
select*from emp where rowid in (select min(rowid),max(rowid) from emp);
| Is This Answer Correct ? | 0 Yes | 0 No |
There are n numbers of flatfile of exactly same format are placed in a folder.Can we load these flatfile's data one by one to a single relational table by a single session??
How translate command is different from replace?
How to call a trigger inside a stored procedure?Give an example.
How to retrieve data from an cursor to a record?
how the indexes are stored in the Oracle Database?
Explain the use of Merge statement in oracle 11g
what are bitmap indexes? How does they work?
What happens to the indexes if a table is recovered?
How to select some rows from a table in oracle?
How to do clean up if create database failed?
if you ctreate table identity
What are the differences between date and timestamp in oracle?