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 / gopi muluka
IN:Returns true if the column matches to any value in a
subquery or a list.
Exists:Returns true if a subquery contains any row.
Generally EXISTS is faster than IN, because it stops
processing once it finds a row in resultset
Join : Returns only rows which are matching on Joining
Column
Union: Combines two or more resultsets with same number of
columns and displays it as a single resultset by
eliminating duplicate records
Union All: Combines two or more resultsets with same number
of columns,displays it as a single resultset including
duplicate records if any exists
Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
tell me what is blocking and how would you troubleshoot it? : Sql server database administration
Why should we go for stored procedures? Why not direct queries?
What are system databases into sql server (2005/2008) : sql server database administration
How to change the system date and time from SQL Plus Terminal ?
How to turn off warning messages during php execution?
How to implement service broker?
Explain microsoft sql server functions?
What are different types of statement?
Does sql server use java?
What is cube dimension? : sql server analysis services, ssas
Is the log file is a part of file group?
What is acid mean in sql server?
Relational calculus is what type of language?
What do you understand by physical_only option in dbcc checkdb?
Explain candidate key, alternate key, and composite key?