The field expression syntax of the WHERE clause in a SOQL query consists of a field
name, a comparison operator, and a value that’s used to compare with the value in the field
name.
fieldExpression uses the following syntax:
1fieldName comparisonOperator value
where:
| fieldName |
The name of a field in the specified object. Use of
single or double quotes around the name will result in an error. You must have at least
read-level permissions to the field. It can be any field except a long text area field,
encrypted data field, or base64-encoded field. It does not need to be a field in the
fieldList. |
| comparisonOperator |
Case-insensitive operators that compare
values. |
| value |
A value used to compare with the value in
fieldName. You must supply a value whose data type matches the field
type of the specified field. You must supply a native value—other field names or
calculations are not permitted. If quotes are required (for example, they are not for dates
and numbers), use single quotes. Double quotes result in an error. |