What is the difference between in and exists.
Ex: select * from emp where empno in(....) and
select * from emp where empno exists(....)

What is the difference between a Join and Union and Union
and UnionAll.

Answer Posted / manoj pandey

Check below links to know the reason with examples from my blog posts:

IN vs EXISTS vs JOIN: http://sqlwithmanoj.wordpress.com/2011/02/15/not-in-not-exists-joins-with-null-values/

UNION vs UNION ALL: http://sqlwithmanoj.wordpress.com/2010/12/30/why-union-all-is-faster-than-union/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When you should use a low fill factor?

716


What is the cpu pressure?

762


How to see existing views in ms sql server?

717


What is normalization? Describe its different types.

764


What is the difference between executequery () and executeupdate ()?

706






What are the requirements on sql server network connections?

685


as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration

724


How raid can influence database performance?

753


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

691


How to create an index on an existing table in ms sql server?

675


Can sql server 2016 run on windows 7?

678


What is the server name in sql server?

714


What the different components in replication and what is their use?

708


Can a table be created inside a trigger?

723


Where actually sql azure database is hosted?

157