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 retrive only second row from table?

Answer Posted / kishore.p

select top 1 * from tblemp b where b.empsal not in(select
top n-1 empsal from tblemp e)

note:- here the n will be the number of only row you would
like to display.

here in the above case n=2 i.e., n-1=1

so this will be the querry:

select top 1 * from tblemp b where b.empsal not in(select
top 1 empsal from tblemp e)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql in java?

1028


What are sql triggers used for?

959


What is a recursive join sql?

1027


How to display Row Number with Records in Oracle SQL Plus?

993


What is dcl in sql?

907


Can triggers stop a dml statement from executing on a table?

1027


What is the difference between rollback and rollback to statements?

1015


What are the two types of periodical indexes?

887


What does cursor do in sql?

971


How global cursor can be declare with dynamic trigger ?

2148


What's the difference between a primary key and a clustered index?

947


how can you create an empty table from an existing table? : Sql dba

1080


What is the difference between jpql and sql?

1024


what are ddl statements in mysql? : Sql dba

1114


How do I restart sql?

915