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 / shafiq...

When you use IN operator it will scan all the row in table
to check and Exists means when its find the data stop
execute to check further row.

Join- to join matching data from two or more table.
Union- Retrive matching data from both table.
UnionAll- Retrive matching as well as unmatched data from
both data.

hope this is clear

Is This Answer Correct ?    19 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between functions and stored procedures in sql server?

563


How do you rebuild an identity column?

630


Explain what you mean by 3 tier architecture.

720


explain what is raid and what are different types of raid configurations? : Sql server database administration

628


Which is faster statement or preparedstatement?

618






What is the recursive stored procedure in sql server?

607


What is the name of reporting services config file and what’s it’s used for?

111


What specific conditions database should meet, before you can bulk copy data into it using bcp?

638


What is NOT NULL Constraint in sql server 2012?

672


How to modify the underlying query of an existing view?

634


Do you know what is sql injection?

624


How to encrypt Strored Procedure in SQL SERVER?

642


What are various aggregate functions that are available?

589


Detail about query optimizer?

701


How to filter out duplications in the returning rows in ms sql server?

733