how to find the second salary?

Answer Posted / m.s.patil

select max(sal) from t1 where sal not in (27777);

27777 is max salary in table

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

2024


Explain the properties of sub-query in sql server?

503


What is blocking and how would you troubleshoot it? : sql server database administration

580


How to connect sql server management studio express to sql server 2005 express?

572


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

739






What is difference between delete and truncate commands?

521


What do you understand by intent locks?

570


what is difference between view and Dip.

1991


What is the purpose of the master database?

602


You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?

564


What are the operating modes in which database mirroring runs?

602


What is entity data services?

574


What are the advantages of having an index on the sql server?

534


What do you do in data exploration

557


Define msdb database?

592