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 |
Using the relations and the rules set out in the notes under each relation, write table create statements for the relations EMPLOYEE, FIRE and DESPATCH. You should aim to provide each constraint with a formal name, for example table_column_pk.
What is the difference between column level constraints and table level constraints?
14 Answers IBM, TCS,
Name the various constraints used in oracle?
What is oracle database client?
What are named parameters?
Does a Before form trigger fire when the parameter form is suppressed ?
How to count duplicated values in a column in oracle?
Why use resource manager in Oracle?
How to omit columns with default values in insert statement in oracle?
How to create a table index in oracle?
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
What are the differences between interval year to month and interval day to second?