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
What stored by the msdb?
Can we write trigger for view?
List all the types of user-defined functions?
Explain what are the basic functions for master, msdb, model, tempdb databases?
What is log cache in sql server?
Explain system views?
What are the new features of sql server 2008 r2 reporting service?
What happens to a statement batch if there is a compilation error?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
what are user defined datatypes and when you should go for them? : Sql server database administration
What are trace flags and mention a few common trace flags used with sql server?
Explain transaction server isolation?
What do you understand by recursive stored procedure?
what are the new features in SSRS?
Do you know spatial data types - geometry and geography in sql server 2008?