how to find the First and Last Observation from the table:
Ex: OBS Name Sal Ans like: OBS Name Sal
105 E 5000--> 105 E 5000
102 B 2000 104 D 4000
103 C 3000
101 A 1000-->
104 D 4000
Answers were Sorted based on User's Feedback
Answer / shailesh jori
select * from table_name where rowid=(select min(rowid) from table_name) or rowid=(select max(rowid) from table_name)
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / ajit
SELECT MIN(Obs)
FROM <Table_name>
UNION ALL
SELECT MAX(Obs)
from <Table_name>;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mahendar reddy
select *from t_name where rownum=1
union
(select *from t_name
intersect
select *from t_name where rowid=(select max(rowid)from t-name));
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / arjun
select * from tablename where rowid=1
union
( select * from tablename
intersect
select * from tablename where rowid = ( select max(rowid)
from tablename));
Is This Answer Correct ? | 0 Yes | 6 No |
How does index help in query performance?
What can you do with pl sql?
Can there be 2 primary keys in a table?
Can any one tell me how to increase the performance of a sql query ie what are the performance tips in creating or writing a sql query !!?
What is a ddl command?
how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00
What are pl/sql cursors?
Which is the correct statement about truncate and delete?
What is the difference between an inner and outer join?
what is explain plan?
Are stored procedures faster than dynamic sql?
Is primary key is clustered index?