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
How many triggers are possible per table?
What is the command to change the recovery model?
How do I find query history in sql server?
What is mean by candidate key?
What is efficiency data?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
How does index makes search faster?
Which are the new data types introduced in sql server 2008?
What is the query and subquery?
What is always encrypted?
How many categories of functions based their return modes?
What is ms sql server service broker?
What is default constraint?
tell me the disaster recovery plan
What kind of problems occurs if we do not implement proper locking strategy?