Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
[Figure: Example of LIKE predicate specification (using an arbitrary string specifier)]
Examples of using arbitrary string specifier "_"
Examples of using arbitrary string specifier "_" are shown below. The figure with the example of "Figure: LIKE
predicate specification (using an arbitrary string specifier)" shows which row is specified.
Example 1:
Rows of four characters for which the value in column COL1 in table TBL5 begins with "ABC" and ends
with any character are specified.
SELECT ... FROM SCM.TBL5 WHERE COL1 LIKE 'ABC_'
Example 2:
Row of six characters for which the value in column COL1 in table TBL5 begins with "ABC" and ends
with any three characters are specified.
SELECT ... FROM SCM.TBL5 WHERE COL1 LIKE 'ABC___'
Example 3:
Rows of four characters for which the value in column COL1 in table TBL5 begins with any character
and ends with "ABC" are specified.
SELECT ... FROM SCM.TBL5 WHERE COL1 LIKE '_ABC'
Example 4:
Rows of five characters for which the value in column COL1 in TBL5 begins with any two characters
and ends with "ABC" are specified.
SELECT ... FROM SCM.TBL5 WHERE COL1 LIKE '__ABC'
Example 5:
103