attribute-list
-
- This is usually a comma separated list of attributes (field names)
- Expressions involving these attributes may be used. The normal mathematical operators
+, -, *, /
may be used on numeric values. String values may be concatenated using||
- To select all attributes use *
- The attributes in this case are:
name
,region
,area
,population
andgdp
-
table-name
- In these examples the table is always
bbc
.
- In these examples the table is always
-
condition
-
- This is a boolean expression which each row must satisfy.
- Operators which may be used include
AND
,OR
,NOT
, >, >=, =, <, <= - The
LIKE
operator permits strings to be compared using 'wild cards'. The symbols _ and % are used to represent a single character or a sequence of characters. Note thatMS Access SQL
uses?
and*
instead of_
and%
. - The
IN
operator allows an item to be tested against a list of values. - There is a
BETWEEN
operator for checking ranges.
A common mistake made with boolean expressions
Boolean expressions often read like "normal" English however the syntax is not as rich. For example we might say name equals 'France' or 'Germany'
however the corresponding boolean expression is name='France' OR name='Germany'
No comments:
Post a Comment