Find 2nd Highest salery in emp table
Select* from emp where &n=
select * count from emp where (salery >=emp.salery)
Enter n value 2
These query is correct or not. Tell me any other methods.
Answer Posted / r.rajivgandhi
Select max(salary) from emp where salary <(select max
(salary) from emp)
These Query is correct.Try It
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
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.
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What is the difference between a primary key and a unique key? Are they the same?
Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .
How you can get the list of largest tables in a database?
What is blocking and how would you troubleshoot it? : sql server database administration
What is cdc in sql server?
Give main differences between "Truncate" and "Delete".
You are doing log shipping due to some reasons it is failing. How you will proceed from there
What are the 7 disadvantages to a manual system?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
What are partitioned views and distributed partitioned views?
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
What is microsoft sql server?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?