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

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

Answer Posted / neelu

select max(salary) from employees where rownum<= 2
order by salary desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the differences between sql server and mysql.

507


What do mean by xml datatype?

617


Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

638


How to stop log file growing too big?

573


What is sql server query analyzer?

509






Can we insert data if clustered index is disabled?

508


What action plan is preferred if sql server is not responding?

535


Write a query for primary key constraint with identity key word?

575


State the difference between union and union all?

521


Other than truncate statement, which other command can by-pass the trigger on the tables?

620


Explain syntax for disabling triggers?

526


What is the maximum size of sql server database?

511


What is the importance of a recovery model?

609


What are the steps you should follow to start sql server in single-user mode?

486


What is key attribute?

510