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
When to use Inner join & when to use subquery?
Where are SQL server users names and passwords are stored in sql server?
What is the xml datatype?
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
what is raid and what are different types of raid configurations? : Sql server database administration
Delete duplicate rows without using rowid.
what are user defined datatypes and when you should go for them? : Sql server database administration
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
Is mysql better than sql server?
What are different types of roles provided by ssrs?
Explain intellisense for query editing
Explain few examples of RDBMS?
Explain identity in sql server?
How to delete a login name in ms sql server?
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.