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 is the difference between an index and a unique index?
How to add more data to the testing table in ms sql server?
What is a db view?
What do you mean by cardinality?
what is a traditional network library for sql servers? : Sql server database administration
What are the differences between clustered and non-clustered index?
Can two tables share a primary key?
explain what is raid and what are different types of raid configurations? : Sql server database administration
How many triggers are possible per table?
Can you create a logon trigger in sql server 2005 express edition?
How to find out what is the default collation in a database?
Should you normalize audio?
Tell me what is log shipping?
How can I check that whether automatic statistic update is enabled or not?
Are resultset updatable?