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
Explain database normalization?
Explain what is “asynchronous” communication in sql server service broker?
How do you start single user mode in clustered installations?
How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?
What is order of B+tree?
How will you hide an attribute? : sql server analysis services, ssas
What are the advantages of paper records?
What are examples of triggers?
What to check if a User database is locked?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
between cast and convert which function would you prefer and why?
What is difference between equi join and natural join?
How to rename an existing table with the "sp_rename" stored procedure in ms sql server?
How to copy data from one table to another table?
Which data type columns are the best candidates for full-text indexing?