1. Union Clause
The UNION clause combines the results from two or more SQL SELECT statements into a single result set containing rows from all the queries in the UNION operation
By default, UNION eliminates duplicate rows from the combined result set.
select count(*) as total applications
from Employee_Application
union
select count(*) as total_applciations
from Loan_Applications
2.Intersect Clause
The following query returns any distinct values that are returned by both the query on the left and right sides of the INTERSECT operand.
SELECT ProductID FROM Production.Product
INTERSECT
SELECT ProductID FROM Production.WorkOrder
3. Except Clause
SELECT ProductID FROM Production.Product
EXCEPT
SELECT ProductID FROM Production.WorkOrder
Labels
- AVG() Function (1)
- Aggregate Functions (1)
- Candidate Key (1)
- Composite and Compound Keys (1)
- EXISTS (1)
- FIRST() Function (1)
- Group By Statement (1)
- Having Clause (1)
- INSERT (1)
- LIKE (1)
- SELECT AS CLAUSE (1)
- SQL Distinct Unique Records (1)
- SQL IN (1)
- SQL Joins (1)
- SQL Last() Function (1)
- SQL NULL Conditional (1)
- SQL Not Exists (1)
- SQLComparison Operators (1)
- Sql Max() Function (1)
- Sql Min() Function (1)
- Sql SUM() Function (1)
- WHERE (1)
Blog Archive
-
▼
2010
(73)
-
▼
April
(21)
- Monthly Count at Column Level
- SQL SUM() Function
- SQL Min() Function
- SQL Max() Function
- SQL Last() Function
- SQL Not Exists
- FIRST() Function
- COUNT() function
- The AVG() Function
- SQL Aggregate Functions
- Group By Statement
- HAVING Clause
- SQL Joins
- Full Text Search
- CONTAINS Predicate
- WHERE Clause
- EXISTS
- Like Operator
- UNION/INTERSECT CLAUSES
- INSERT Statement Syntax
- SELECT - SQL Command
-
▼
April
(21)
Thursday, April 8, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment