1. How to fetch all the duplicate records from the table.
2. How to fetch the second highest salary from the table.
Answer Posted / sneha s
fetch duplicate records from table:
select column_name from table_name group by column_name having count(column_name)>1;
get the second highest salary:
select distinct salary from emp order by salary desc limit 1,1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different types of locks in the database?
Ms sql server index?
Is INSTEAD OF trigger directly applicable to Table ?
System variable and temporary variables
What are a database and a data warehouse?
What is sql server transaction log file?
SQL Server Architecture ?
Is sql server is free?
Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?
What are different types of statement?
What is parameterized reports in ssrs ?
What is the difference between a fill factor of 100 and 0?
What are the common performance issues in sql server?
How does Report Builder support Analysis Services cubes?
What is sql profiler. What are the default templates with it? : sql server database administration