Wednesday, October 7, 2009

Some Q....

Diff between Union and union all is:
Union: select all distinct values from 2 tables.. and
Union all: select all values from both tables

you all know. Then you try this one
Q1.
select all column_name from table1 Union
select all column_name from table2.

guess what is the result? ..
.........................

Q2.
select distinct column_name from table1 Union All
select distinct column_name from table2.
what is the result? ..

try out find the result .....