1. How to fetch all the duplicate records from the table.
2. How to fetch the second highest salary from the table.
Answer Posted / amit kumar
(1) Query to fetch 2'nd highest salary:
Select max(sal) from emptable where sal not in (Select
max(sal) from emptable)
(2) How to fetch all the duplicate records from the table.
SELECT COUNT(*), <COLUMN_NAME> FROM EDUCATION GROUP BY
<COLUMN_NAME>
Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
How to create a Master database in SQL server ?
What is the difference between varchar and varchar types?
Explain what is the difference between a local and a global temporary table?
What are the transaction properties?
What Is Rdbms?
Tell me what is sql profiler?
How use inner join in sql server?
what are database files and filegroups? : Sql server database administration
How to generate create view script on an existing view?
What is the difference RDBMS and Graph Database?
what type of index will get created after executing the above statement? : Sql server database administration
explain how to create a new schema in a database? : Sql server database administration
What are acid properties of transaction?
What is a full text index?
What is 1nf 2nf?