What is a union, intersect, minus?

What is a union, intersect, minus?

UNION
Union operator is used to return all rows from multiple tables and eliminate duplicate rows. The number of columns and the datatypes of the columns must be identical in all the SELECT statements used in the query. The names of the columns need not be identical.

Syntax
SELECT column1, column2 FROM tablename1
UNION
SELECT column1, column2 FROM tablename2;

INTERSECT
This operator is used to return all rows common to multiple queries. Intersect ignores NULL values

Syntax
SELECT column1, column2 FROM tablename1
INTERSECT
SELECT column1, column2 FROM tablename2;

MINUS
This operator returns all those rows from first query that are not present in the second query.

Syntax
SELECT column1, column2 FROM tablename1
MINUS
SELECT column1, column2 FROM tablename2;
Characteristics of function object
Characteristics of function object - A function can allow one or more or no parameter...
Oracle translate and decode
Oracle translate and decode - Translate: translate function replaces a sequence of characters in a string with another set of characters. The replacement is done single character at a time...
Use of Translate Function in Oracle.
Use of Translate Function in Oracle - The translate function performs a character wise replacement of a string...
Post your comment
Discussion Board
intersect operator
intersect operator does not ignore null values but its mentioned in the link as intersect ignores null values.please correct it as this cause confusing while finding out
priyanka shakkari 07-6-2012
intersect operator
intersect operator does not ignore null values but its mentioned in the link as intersect ignores null values.please correct it as this cause confusing while finding out
priyanka shakkari 07-6-2012
intersect operator
intersect operator does not ignore null values but its mentioned in the link as intersect ignores null values.please correct it as this cause confusing while finding out
priyanka shakkari 07-6-2012