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 |
select statement does not retrieve any records. what exception is raised?
Is java required for oracle client?
find out first highest salary?
10 Answers Verinon Technology Solutions,
Difference between open_form and call_form in oracle.
I have two tables : COuntry,city I want all the cities in each country.Question on Cross Join.
List out the types of joins.
I know that i can create a table without a primary key.But is there any significance for that table???? while creating an application.
What is user managed backup in Oracle?
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
What happens to the indexes if a table is recovered?
What is the purpose of init.ora. ? how many init.ora exist in oracle installation? suppose there are 3 database on one oracle server, how many init.ora do I have? what are various database objects? how will you identify memmory related performace issue in oralce? any idea about basic architure difference of oracle and db2? comment on which is better , with reasons? what is a fuction based index? is it recommended to use the same. ? what is global temporay table? what is teh signification of the parameter session_cached_cursor ?
Point the difference between translate and replace?