SQL Reference
Table Of Contents
- Chapter 1 Introduction
- Chapter 2 Supported standards
- Support for Unicode characters
- SQL statements
- SELECT statement
- SQL clauses
- FROM clause
- WHERE clause
- GROUP BY clause
- HAVING clause
- UNION operator
- ORDER BY clause
- OFFSET and FETCH FIRST clauses
- FOR UPDATE clause
- DELETE statement
- INSERT statement
- UPDATE statement
- CREATE TABLE statement
- TRUNCATE TABLE statement
- ALTER TABLE statement
- CREATE INDEX statement
- DROP INDEX statement
- SQL expressions
- SQL functions
- FileMaker system objects
- Reserved SQL keywords
- Index
Chapter 2 | Supported standards 10
If you are joining more than one table, and you want to discard all rows that don’t have
corresponding rows in both source tables, you can use INNER JOIN. For example:
SELECT *
FROM Salespeople INNER JOIN Sales_Data
ON Salespeople.Salesperson_ID = Sales_Data.Salesperson_ID
If you are joining two tables, but you don’t want to discard rows of the first table (the “left” table),
you can use LEFT OUTER JOIN.
SELECT *
FROM Salespeople LEFT OUTER JOIN Sales_Data
ON Salespeople.Salesperson_ID = Sales_Data.Salesperson_ID
Every row from the “Salespeople” table will appear in the joined table.
Notes
1 RIGHT OUTER JOIN is not currently supported.
1 FULL OUTER JOIN is not currently supported.
WHERE clause
The WHERE clause specifies the conditions that records must meet to be retrieved. The WHERE
clause contains conditions in the form:
WHERE expr1 rel_operator expr2
expr1 and expr2 can be field names, constant values, or expressions.
rel_operator is the relational operator that links the two expressions. For example, the
following SELECT statement retrieves the names of employees who make $20,000 or more.
SELECT last_name,first_name FROM emp WHERE salary >= 20000
The WHERE clause can also use expressions such as these:
WHERE expr1 IS NULL
WHERE NOT expr2
Note If you use fully qualified names in the SELECT (projection) list, you must also use fully
qualified names in the related WHERE clause.