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

Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

673


How to find table changes in sql server?

823


What happens when converting big values to numeric data types?

748


how you can list all the tables in a database?

738


How much is a sql server license?

687






Name 3 ways to get an accurate count of the number of records in a table?

755


What are cursors stored procedures and triggers?

676


Why do we use non clustered index?

730


Can you explain different types of locks in sql server?

705


How is foreign key related to primary key?

716


How to create a dml trigger using create trigger statements?

729


How to backup SQL Server Reporting Services ?

122


Is there any difference between primary key and unique with the not null condition?

702


What are the types of joins in sql?

766


What is the purpose of grouping data in a report?

718