semi合集-English.pdf - 第3137页
SEMI E125-0305 © SEMI 2003, 2005 45 R2-1.6.2 String% — String constant followed by t h e “%” or “*” wild character. A wildcard c haracter can also be used by itself to match everyt hing. Use a wildcard character only at …

SEMI E125-0305 © SEMI 2003, 2005 44
RELATED INFORMATION 2
SQL WHERE CLAUSE
NOTICE: This related information is not an official part of SEMI E125 and was derived from the work of the
originating committee. This related information was approved for publication by full letter ballot procedures.
R2-1 Syntax
R2-1.1 The WHERE clause of the SQL SELECT statement is a propositional-expression that consists of one or
more comparisons of values with constants. It has the following form.
WHERE propositional-expression [nested-propositional-expression];
R2-1.2 Syntax
R2-1.2.1 propositional-expression — Specifies a comparison. It takes one of the following forms:
[NOT] term operator term
parameter [NOT] IN (constant
1
,… constant
n
)
parameter [NOT] BETWEEN ( term
1
AND term
2
) (inclusive)
term IS [NOT] NULL | TRUE | FALSE
parameter [NOT] LIKE “string%”
R2-1.2.2 [ ] — An optional equation item.
R2-1.2.3 term — Specifies a parameter, a constant or an arithmetic expression of parameters and constants. The
allowed arithmetic operations are addition (+), subtraction (-), multiplication (*) and division (/).
R2-1.2.4 parameter — Specifies the name of the parameter value to use in the comparison operation.
R2-1.2.5 Constant
1) Specifies a number or a string enclosed by quotation marks.
2) Specifies a conditional. A conditional has the following form.
DECODE( term, constant
1
, return
1
, … constant
n
, return
n
, default )
return
i
The value of the conditional if term equals constant
i
.
default
The value of the conditional if parameter does not equal any constant
i
.
R2-1.2.6 operator — Specifies the operator to use in the comparison. It can be one of the following operators.
Operator Description Operator Description
= Equal <> Not equal
> Greater than < Less than
>= Greater than or equal to <= Less than or equal to
R2-1.3 IN — List Inclusion test (enumeration comparison).
R2-1.4 BETWEEN — Bounds test (limits comparison).
R2-1.5 IS — Equality test.
R2-1.6 LIKE — Pattern matching (string comparison) test. (LIKE only works with ASCII data types).
R2-1.6.1 A | B | … N — One of the listed items is required.

SEMI E125-0305 © SEMI 2003, 2005 45
R2-1.6.2 String% — String constant followed by the “%” or “*” wild character. A wildcard character can also be
used by itself to match everything. Use a wildcard character only at the end of the string constant.
R2-1.6.3 nested-propositional-expression — AND|OR propositional-formula [nested-propositional-formula]
NOTE 1: A semicolon is required at the end of SQL statements. The ‘;’ indicates the SQL statement is complete.
NOTE 2: Parentheses can be used in the usual way to group expressions and establish precedence.
NOTE 3: Floating-point comparisons are approximate. Testing for equality with floating point values is not recommended.

SEMI E125-0305 © SEMI 2003, 2005 46
RELATED INFORMATION 3
PARAMETER CONSTRAINTS
NOTICE: This related information is not an official part of SEMI E125 and was derived from the work of the
originating committee. This related information was approved for publication by full letter ballot procedures.
R3-1 Examples
R3-1.1 This clause specifies that all values of “voltage” that are less than or equal to 50 are valid (i.e., it evaluates
true for all values of voltage less than or equal to 50).
WHERE voltage <= 50;
R3-1.2 The following clauses specifies that all values of “voltage” that are between 0 and 50 (inclusive) are valid.
WHERE voltage >= 0 AND voltage <= 50;
R3-1.3 The clause specifies that all values of “voltage” that are 50 and less or 100 and greater (inclusive) are valid.
WHERE voltage <= 50 OR voltage >= 100;
R3-1.4 The following clause specifies that only “voltage” values of 1, 2, 4, 8 and 16 are valid.
WHERE voltage = 1 OR voltage = 2 OR voltage = 4 OR voltage = 8 OR voltage = 16;
R3-1.5 The following clause specifies that any “voltage” value that is not 1, 2, 4, 8 or 16 is valid.
WHERE voltage <> 1 AND voltage <> 2 AND voltage <> 4 AND voltage <> 8 AND voltage <> 16;