8.1.8 Escape clause
A part enclosed in curly brackets ({ }) in an SQL statement is called an escape clause. An escape clause consists of a keyword and parameters. The keyword is not case sensitive. The following table lists the escape clauses.
Type of escape clause |
Keyword |
---|---|
Date |
d |
Time |
t |
Time stamp |
ts |
LIKE escape-character |
escape |
Outer join |
oj |
Scalar function |
fn |
For details about the scalar functions that can be specified in an escape clause, see 7.8 Scalar functions that can be specified in the escape clause.
- Analysis of escape syntax
-
You can use the setEscapeProcessing method of the Statement class to specify whether analysis of the escape syntax is to be enabled. When this specification is omitted, analysis of escape syntax is enabled. Analysis of escape syntax means that the JDBC driver checks each SQL statement for escape clauses. If an SQL statement contains an escape clause, the JDBC driver converts the SQL statement so that the statement can be executed by HADB.
You can reduce the overhead required for syntax analysis by using the setEscapeProcessing method of the Statement object to disable analysis of escape syntax.