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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to test for null values?

600


How do you go back in sql?

526


Can a varchar be a primary key?

534


how many ways we can we find the current date using mysql? : Sql dba

610


Can function return multiple values in sql?

520






Which table is left in left join?

516


How many types of sql are there?

522


What are the string functions in sql?

523


What language is oracle sql developer?

506


discuss about myisam key cache. : Sql dba

561


what is bdb (berkeleydb)? : Sql dba

563


Explain what is an index?

580


What can I use instead of union in sql?

507


How do you select unique values in sql?

494


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

592