1.1.1

Table Of Contents
In all cases, you can specify additional restrictions on one or both of the tables being joined in outer join clauses
or in the WHERE clause.
INNER JOIN Operation
Specify an explicit join clause.
Syntax
TableExpression [ INNER ] JOIN TableExpression
{ ON boolean-expression }
Description
See also Query Capabilities and Limitations on page 710.
A join clause can be specied using an ON with a boolean expression. The scope of expressions in the ON clause
includes the current tables and any tables in outer query blocks to the current SELECT. In the following example,
the ON clause refers to the current tables:
Select * from trade.securities INNER JOIN trade.portfolio
ON SECURITIES.sec_id = PORTFOLIO.sid and PORTFOLIO.tid = ?
The ON clause can reference tables not being joined and does not have to reference either of the tables being
joined (though typically it does).
Example
-- Join the Customers and Portfolio tables
-- select all the columns from the customers table and
-- add the SID and QTY from the Portfolio table
-- to each row of the result
select C.* , F.sid, F.QTY from trade.customers C JOIN
trade.portfolio F ON C.cid = F.cid
LEFT OUTER JOIN Operation
Specify a join clause that preserves the unmatched rows from the rst (left) table, joining them with a NULL
row in the shape of the second (right) table.
Syntax
TableExpression LEFT [ OUTER ] JOIN TableExpression
{
ON boolean-expression
}
Description
See also Query Capabilities and Limitations on page 710.
The scope of expressions in either the ON clause includes the current tables and any tables in query blocks outer
to the current SELECT. The ON clause can reference tables not being joined and does not have to reference
either of the tables being joined (though typically it does).
Example
--match all customers and their portfolio details, if any,
having a specific
--transaction ID
select * from trade.customers C LEFT OUTER JOIN
vFabric SQLFire User's Guide552
vFabric SQLFire Reference