Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OB..

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

how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OB..

Answer / ajit

SELECT MIN(Obs)
FROM <Table_name>
UNION ALL
SELECT MAX(Obs)
from <Table_name>;

Is This Answer Correct ?    1 Yes 0 No

how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OB..

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

how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OB..

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

Post New Answer

More SQL PLSQL Interview Questions

what is cursor procedure

1 Answers   iGate,


can we call a procedure into another procedure?If yes means how you can pass the perameters for the two procedures?

2 Answers   Fujitsu,


Show code of a cursor for loop.

0 Answers  


What are the two types of cursors in pl sql?

0 Answers  


what is sql.

7 Answers   Ericsson, Hewitt,


How do I copy a table in sql?

0 Answers  


full outer join syntax

5 Answers  


List out the acid properties and explain?

0 Answers  


what is a materialized view? : Sql dba

0 Answers  


What is the sql*loader? : aql loader

0 Answers  


Does a primary key have to be a number?

0 Answers  


What are different types of triggers?

0 Answers  


Categories