SQL clauses

The ODBC and JDBC client drivers provide support for the following SQL clauses.

Use this SQL clause

To

FROM clause

Indicate which tables are used in the SELECT statement.

WHERE clause

Specify the conditions that records must meet to be retrieved (like a FileMaker Pro find request).

GROUP BY clause

Specify the names of one or more fields by which the returned values should be grouped. This clause is used to return a set of aggregate values by returning one row for each group (like a FileMaker Pro subsummary).

HAVING clause

Specify conditions for groups of records (for example, display only the departments that have salaries totaling more than $200,000).

UNION operator

Combine the results of two or more SELECT statements into a single result.

ORDER BY clause

Indicate how the records are sorted.

OFFSET clause format

State the number of rows to be skipped before starting to retrieve rows.

FETCH FIRST clause format

Specify the number of rows to be retrieved. No more than the specified number of rows are returned although fewer rows may be returned if the query yields less than the number of rows specified.

FOR UPDATE clause

Perform Positioned Updates or Positioned Deletes via SQL cursors.

Note  If you attempt to retrieve data from a table with no columns, the SELECT statement returns nothing.