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

Can we add our custom code in ssis?

625


What is the maximum size of sql server database?

594


how would you store your query in an SSRS report or a Database server?

134


can a table be moved to different filegroup? : Sql server administration

624


What is a recursive stored procedure in sql server?

663






How the authentication mode can be changed?

735


what is difference between NULL and ISNULL in SQL Server 2008?

663


What is sql server used for?

631


How do you set a trace flag in sql server?

653


What is an expensive query?

623


What are ddl (data definition language) statements for tables in ms sql server?

633


you have couple of stored procedures that depend on a table you dropped the table and recreated it what do you have to do to reestablish those stored procedure dependencies?

683


What is the difference between char, varchar and nvarchar?

671


Tell me about builtinadministrator?

648


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

626