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 to use "begin ... End" statement structures in ms sql server?
What is a with(nolock)?
What are sp_configure commands and set commands?
How do I perform an unattended install of sql server 2000?
How except clause is differs from not in clause?
Can two different columns be merged into single column? Show practically?
What are the aggregate and scalar functions?
How do I completely remove sql server instance?
Do you know what is similarity and difference between truncate and delete in sql?
What do you understand by SQL*Net?
What is the difference between SQL notification and SQL invalidation?
Tell me what do you understand by a view? What does the with check option clause for a view do?
How many null values we can have in a unique key field in sql server?
Explain timestamp datatype?
What function does a database engine serve in the sql server?