• Login

DataSoft Corporation

Select Correlation-Name Example

Both table and column correlation names are supported.

The following example selects data from both the person table and the faculty table using the aliases T1 and T2 to differentiate between the two tables.

SELECT * FROM Person t1, Faculty t2 WHERE t1.id = t2.id

The correlation name for a table name can also be specified in using the FROM clause, as seen in the following example.

SELECT a.Name, b.Capacity FROM Class a, Room b 
WHERE a.Room_Number = b.Number
Thursday, 18 April 2019 Posted in Example SQL Statements