Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials Oracle Sql server .NET Java Soft skills CV GD Work from home Online practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
Oracle interview
Oracle architecture
Oracle FAQs
Test your Oracle skills!
More Oracle FAQs
Oracle processes
Oracle memory area
Oracle file types
Oracle database objects
Oracle operators
Oracle composite
Oracle constraints
Oracle data types
Oracle DCL and TCL
Oracle DML commands
Oracle error handling
Oracle functions
Oracle function, procedure, package
Oracle import and export
Oracle sub queries
Oracle table
Oracle triggers
Oracle views
Oracle synonym
Oracle indexes
Oracle joins
Oracle cursors
Oracle form
Oracle security
Oracle system privilege
Oracle object privileges
Oracle table privileges
Oracle view privileges
Oracle backup & recovery
Oracle DBA
Oracle PL/SQL
Oracle nested table & varrays
Oracle large objects
Oracle replication
Oracle transaction
Oracle optimizer
Oracle auditing
Oracle backup
Oracle database tuning
Oracle application tuning
Oracle procedures
Oracle functions
Oracle loops
Oracle exceptions
Oracle Select into clause
Oracle string functions
Oracle numeric functions
Oracle date functions
Oracle translate and decode
Oracle correlated sub-queries
Oracle union, intersect and minus
Oracle clusters
Oracle sequences
Oracle tablespaces
Oracle object datatypes
Oracle Tutorial
 

Oracle union, intersect and minus

<<Previous  Next>>

Explain union, intersect and minus with examples.

Oracle union, intersect and minus - Dec 03, 2008 at 15:00 PM by Rajmeet Ghai

Explain union, intersect and minus with examples.

UNION: The UNION operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement must have the same number of columns with similar data types. It eliminates duplicates.

Syntax:
SELECT column_name(s) FROM table_name1
UNION
SELECT column_name(s) FROM table_name2

Example:
SELECT emp_Name FROM Employees_india
UNION
SELECT emp_Name FROM Employees_USA

INTERSECT allows combining results of two or more select queries. If a record exists in one query and not in the other, it will be omitted from the INTERSECT results.

Syntax:
select field1, field2, . field_n from tables INTERSECT select field1, field2, . field_n from tables;

Example:
select salary from employee INTERSECT select salary from manager;

SQL MINUS returns all rows in the first query that are not returned in the second query. Each statement must have the same number of fields in the result sets with similar data types.

Syntax:
Select field1, field2, . field_n from tables
MINUS
select field1, field2, . field_n from tables;

Example:
Select salary from employee
MINUS
select salary from manager

Also read
Oracle Functions, Procedures, packages

Explain IN, OUT and INOUT in procedures, What are the rules of writing package?, Explain the rules for writing a package..............

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.............

<<Previous  Next>>

 

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.