1. How to fetch all the duplicate records from the table.
2. How to fetch the second highest salary from the table.
Answer Posted / ashwini
2. Second highest salary from the table
select top 1 salary from emp where salary NOT IN
(SELECT MAX(salary) FROM emp)order by salary desc
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
on line cluster can we make if yes tell me the procedure
What is the xml datatype?
What is msdb database? : SQL Server Architecture
What stored by the model?
How to sort query output in descending order in ms sql server?
Explain the various types of concurrency problem?
What is the data tier application?
How to list all triggers in the database with sys.triggers in ms sql server?
What will be query used to get the list of triggers in a database?
How do you rename a table in sql server?
What are the advantages of the mirroring?
What command do we use to rename a db, a table and a column?
Define the one-to-one relationship while designing tables.
Explain the difference between function and stored procedure?
Why are you getting errors when creating a new odbc dsn?