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 |
What is secondary key?
What is case function?
what is heap table? : Sql dba
Why does %isopen return false for an implicit cursor?
What are the different dml commands in sql?
How would you reference column values before and after you have inserted and deleted triggers?
What is a schema sql?
When are we going to use truncate and delete?
What is the purpose of a secondary key?
Are stored procedures faster than queries?
What is db journal file?
What is left join example?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)