To reference a database field in SQL, you reference the column that represents that field in the relevant database table. You can reference both data and configuration fields. In each case, the column reference comprises the data type of the database field that the column represents (see Data Types).
In an SQL query, a column can comprise:
- A reference to a database field (as described above, referenced using column-ref)
- The result of an expression, including one that:
- Uses an alias
- References content other than a database field (for example, a literal value)
- References one or more database fields.