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 select 5 to 7 rows from a table, which contains 10 rows?

Answer Posted / tb

select a.empid, a.ename,a.salary from (select * from emp
order by empid desc LIMIT 6) b INNER JOIN (select * from
emp order by empid asc LIMIT 7) a on b.empid=a.empid

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is table level trigger?

1057


How can we get count of the number of records in a table?

996


What is use of dbcc commands?

1123


Explain what is use of dbcc commands?

1132


How to assign new column names in a view?

960


What is difference between inner join and join?

1096


What is the default fill factor value?

1128


What is normalization and denormalization in sql server?

1065


What the class forname () does?

1141


Where sql server usernames and passwords are stored in a sql server?

1037


Write a query for primary key constraint with identity key word?

1083


How can you know if the row fetched from cursor is still valid in underlying table?

1047


How to create a view on an existing table in ms sql server?

1193


Where is my database stored on the hard disk in ms sql server?

1111


Explain the flow of creating a cube? : sql server analysis services, ssas

1102