FROM

Specify the tables from which the other clauses of the query can access columns for use in expressions.

Syntax

FROM table-expression [ , table-expression ] *

Description

The FROM clause is a mandatory clause in a select-expression. It specifies the tables (table-expression) from which the other clauses of the query can access columns for use in expressions.

Example

SELECT CUST_NAME FROM TRADE.CUSTOMERS WHERE CID < 5
-- other types of TableExpressions
SELECT TABLENAME, ISINDEX 
FROM SYS.SYSTABLES T, SYS.SYSCONGLOMERATES C
WHERE T.TABLEID = C.TABLEID
ORDER BY TABLENAME, ISINDEX
-- force the join order
SELECT * FROM TRADE.SECURITIES S, TRADE.PORTFOLIO F WHERE SEC_ID = F.SID AND F.TID = ?
-- a TableExpression can be a joinOperation. Therefore
-- you can have multiple join operations in a FROM clause
SELECT * FROM TRADE.CUSTOMERS C LEFT OUTER JOIN TRADE.PORTFOLIO F LEFT OUTER JOIN TRADE.SELLORDERS SO ON F.CID = SO.CID ON C.CID= F.CID 
     WHERE SO.SID < 100 AND SO.QTY > 500