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
What is the difference between writing data to mirrored drives versus raid5 drives
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
List some of the rules that apply to creating and using a ‘view’
What are the advantages of paper records?
What is store procedure? How do they work?
What is constraints and its types?
Which autogrowth database setting is good?
What are cascading parameters in ssrs reports?
Do you know what is a linked server in sql server?
What are the benefits of normalization?
What is subquery explain with example?
How to override dml statements with triggers?
What happens to a statement batch if there is a compilation error?
List the different index configurations possible for a table?
What is a data source or ds? : sql server analysis services, ssas