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 create and drop temp table in sql server?
You want to implement the many-to-many relationship while designing tables. How would you do it?
User wants only to display only pdf as export option in report manager. How to achieve this?
Explain different types of self contained sub query?
What new data source types were added in ssrs 2014?
How to drop an existing table with "drop table" statements in ms sql server?
What do I need to start working with sql studio? : sql server management studio
What happens when transaction log is full?
Do you know what is difference between stored procedure and user defined function?
What is data block and how to define data block size?
Explain linked server in sql?
can SSRS reports Cache results?
Which is the latest version of sql server and when it is released?
Mention the command used to rename the database.
How do I start sql server 2017?