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

Is there a 64 bit version of ssms?

961


What is substitution variable?

1053


Why do we use joins?

1040


Why do we need cursors in pl sql?

1083


What are crud methods?

1037


List different type of expressions with the example.

935


Does sql require a server?

1018


Explain commit, rollback and savepoint.

1002


Explain spool.

1184


What is primary key secondary key alternate key candidate key?

1037


Explain the the update statement in sql?

1039


What is the difference between a subquery and a join?

1108


Can 2 queries be executed simultaneously in a distributed database system?

1143


Why truncate is faster than delete?

1114


how can we find the number of rows in a table using mysql? : Sql dba

1084