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 |
How to define a variable to match a table column data type?
Explain the use of rows option in imp command.
Anyone have the Latest Oracle Dumbs?While u have please forard to narain1411@gmail.com
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
Can a formula column be obtained through a select statement ?
Select the Nth lowest value from a table?
Please explan Why static query is more faster than dynamic query ?
What happens if variable names collide with table/column names?
What is meant by recursive hints in oracle?
What is a parameter file in oracle?
How to shutdown your 10g xe server?
How to connect to the server with user account: sys?