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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use %rowtype & %type in plsql?

1000


What are the uses of sysdate and user keywords?

1060


What is multiple columns?

1021


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

1973


What are different types of functions in sql?

968


Why is a trigger used?

895


What is the starting oracle error number? What is meant by forward declaration in functions?

955


what are the advantages of mysql in comparison to oracle? : Sql dba

952


what is the difference between char and varchar data types? : Sql dba

1020


what is a foreign key ? : Sql dba

1046


Can I join the same table twice?

1005


Are null values same as that of zero or a blank space?

984


Are sql database names case sensitive?

952


What is bind variable in pl sql?

997


Does truncate table reset auto increment?

951