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

Explain trigger and its types?

797


How to set the current database in ms sql server?

719


What is indexing a document?

722


What are Spatial data types in SQL Server 2008

721


What is set nocount on and what is set nocount off?

664






What is sql server management studio? : sql server management studio

736


What is join query?

663


Which data type columns are the best candidates for full-text indexing?

755


How to view the error log for any specific instance? : sql server database administration

767


What do you mean by an execution plan?

770


What is resource db in sql server?

749


How to create a dynamic cursor with the dynamic option?

716


What is the full form of ddl?

664


What is intellisense?

785


What is acid properties?

776