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

How to invoke a trigger on demand?

1026


Why use “pivot” in sql server?

1041


Why truncate is ddl?

1027


If a table does not have a unique index, can a cursor be opened on it?

871


how do you determine the Load performance of any query in sql server {example how do u determine performance of a select stmnt which returns Dynamically many no of records ... some times 100,1000,10000 etc., }

2261


How to create new table with "create table" statements?

993


Explain the use of containers in ssis?

889


What are the dmvs? : sql server database administration

1003


What is the difference between left and right outer join?

1016


Tell me what is difference between clustered and non clustered index?

896


What is partitioned view?

850


Can a database be shrunk with users active?

1062


Distinguish between nested subquery and correlated subquery?

973


What is subquery in sql?

986


How connect excel to sql server?

928