Previous Topic

Next Topic

SQL SIMILAR TO Extended Comparison Operator

The SIMILAR TO extended comparison operator returns true or false depending on whether its pattern matches the given string. It is similar to LIKE, except that it interprets the pattern using the a regular expression.

The syntax is:

  Value [NOT] SIMILAR TO [Regular Expression]

Use the SIMILAR TO extended comparison operator to filter a table based on the matching of a field value to a regular expression.

Use NOT to return the converse of a SIMILAR TO comparison. SIMILAR TO can be used only with string or compatible data types such as memo fields.

Examples:

Note: For details of the Regular Expression syntax see the SQL:1999 Standard.

See Also

SQL Extended Comparison Operators

Book Contents

Book Index