March 20th, 2010

Union

Posted by admin in B. SQL Basics

A table “union” means that the rows of one table are combined under the rows of another table. Unions are rarely used.

Table A:

Table B:

Result table of a union:

The definition (data type) and number of columns in the first table must exactly match the definition and number of columns in the second table. Since the source tables may have different column names, the result table has no column names.

March 19th, 2010

Join

Posted by admin in B. SQL Basics

A table “join” means that data from two or more tables can be used to create a single result table. The join makes an RDBMS a very powerful tool.

EMPLOYEE_TBL:

 

PAYROLL_TBL:

Joined Result Table:

March 18th, 2010

Selection

Posted by admin in B. SQL Basics

Table “selection” means that all or some of the table rows can be retrieved into the result table.

Selected Result Table:

« Previous PageNext Page »