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 / saradhi

Just like JOINS, UNION combines data into a single record-
set but vertically by adding rows from another table. JOINS
combine data horizontally by adding columns from another
table.

UNION insures you get DISTINCT records from both the tables.
UNION ALL pulls out all records from both the tables with
duplicates.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are transactions in sql?

543


What is store procedure? When do you use?

521


How to get the query of a table in sql server?

496


What is triggers and stored procedures?

512


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

749






if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration

523


What is rolap and its advantage? : sql server analysis services, ssas

640


Can you explain what is sql server english query?

537


How to execute a stored procedure in ms sql server?

546


How to scale out a federation by Sql statement?

92


What are points to remember while using the fillfactor argument?

526


What is key attribute?

506


What are the functions in sql server?

541


How to modify the underlying query of an existing view?

532


How much memory that we are using in Logshipping Concept?

1364