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 it means to be triggered?

492


What is difference between count (*) and count 1?

509


What is 2nf normalization form?

605


What are differences in between sql server 2012 and sql server 2016?

561


What do you mean by tablesample?

632






Do you know what are the ways available in sql server to execute sql statements?

536


When a primary key constraint is included in a table, what other constraints does this imply?

591


Can we delete data from a view?

536


Define inner join? Explain with an example?

505


What is the Difference Between Primary and Foreign Key?

581


What is difference between inner join and join?

534


What does the on update no action do?

582


what is hash nonclustered index

530


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

550


what are the disadvantages of cursors? : Sql server database administration

489