Expressions that compute values from one or more columns can be used advantageously in the WHERE clause of a query. Any legal arithmetic expression involving columns, constants, functions and arithmetic operators (+, -, * andĀ /) is permitted in a WHERE clause. Parentheses may be used as necessary to define evaluation order.
The following query is an example of an expression appearing in the WHERE clause of a query:
SELECT pno, weight FROM part WHERE city = "LONDON" AND weight * 2 > 25