what is syntex second or third highest salary.
thanks & Regards
Dhirendra sinha
Answer Posted / vikas kant
---To get 2nd highest salary----
select Top 1 salary from Emp where marks in(select top 2
salary from Emp order by salary desc)
---To get 3rd highest salary----
select Top 1 salary from Emp where marks in(select top 3
salary from Emp order by salary desc)
Regards Vikas Kant
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the types of subscriptions in SQL Server replication?
Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.
How to transfer data from a cursor to variables with a "fetch" statement?
How does clustered and non clustered index work?
What are the diifferences between the ms sql server vs mysql?
Differentiate between SQL and ORACLE joins and write their syntax.
Explain triggers?
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
What is the difference between grant and with grant while giving permissions to the user?
Define left outer join in sql server joins?
What is merge replication?
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
Do you know what is openxml in sql server?
Explain the steps to create and execute a user-defined function in the sql server?
How to use wildcard characters in like operations in ms sql server?