1. How to fetch all the duplicate records from the table.

2. How to fetch the second highest salary from the table.

Answer Posted / oracle.hemant

select max(salary) from emp where salary<(select max(salary)
from emp)

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between union and union all?

547


Can we write ddl in trigger?

495


What is built-in function?

545


What is partition in sql server?

528


what is a self join? : Sql server database administration

526






What have included columns when we talk about sql server indexing?

576


What do you understand by recursive stored procedures?

568


What is normalization 1nf 2nf 3nf?

628


What is field in algebra?

626


What is a collation?

594


Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

542


what are candidate key, alternate key and composite key? : Sql server database administration

493


What is CTE in SQL

541


How do I run a trace in sql server?

502


Do you know hot add cpu in sql server 2008?

538