FROM clause

Description

Specifies the database tables or views involved in a SELECT statement.

Syntax

... FROM table-expression [, …]

Parameters

table-expression:{ table-spec | table-expression join-type table-specON condition ] | ( table-expression [, …] ) }

table-spec:{ [ userid.] table-name [ [ AS ] correlation-name ] | select-statementAS correlation-namecolumn-name [, …] ) ] }

contains-expression:{table-name | view-name } CONTAINScolumn-name [,...], contains-query ) [ [ AS ] score-correlation-name ]

Usage

contains-expression Use the CONTAINS clause after a table name to filter the table, and return only those rows matching the full text query specified with contains-query. Every matching row of the table is returned, along with a score column that can be referred to using score-correlation-name, if it is specified. If score-correlation-name is not specified, then the score column can be referred to by the default correlation name, contains.

With the exception of the optional correlation name argument, the CONTAINS clause takes the same arguments as the CONTAINS search condition. There must be a TEXT index on the columns listed in the CONTAINS clause.

See “CONTAINS conditions” and CONTAINS conditions in Chapter 2, “SQL Language Elements,” in Reference: Building Blocks, Tables, and Procedures.

For the full syntax and description of the FROM clause, see FROM clause in Chapter 1, “SQL Statements” of Reference: Statements and Options.