JDBC Escapes
JDBC Escapes#
The JDBC specification provides the escape syntax for the JDBC application to understand vendor specific SQL for database products. The JDBC driver converts a SQL statement which includes the escape syntax to a native SQL statement for its database.
The following table is an organization of SQL statements which include the escape syntax supported by the JDBC specification and SQL statements converted by the JDBC driver for use in Altibase.
Type |
SQL statements supported in the JDBC specification |
SQL statements converted for use in Altibase |
---|---|---|
ESCAPE |
SELECT cVARCHAR FROM t1 WHERE cVARCHAR LIKE '%a|%b%' {escape '|'} |
SELECT cVARCHAR FROM t1 WHERE cVARCHAR LIKE '%a|%b%' escape '|' |
FN |
SELECT {fn concat('concat', 'test')} FROM dual |
SELECT concat('concat', 'test') FROM dual |
DTS |
UPDATE t1 SET cDATE = {d '1234-12-30'} |
UPDATE t1 SET cDATE = to_date('1234-12-30', 'yyyy-MM-dd') |
UPDATE t1 SET cDATE = {t '12:34:56'} |
UPDATE t1 SET cDATE = to_date('12:34:56', 'hh24:mi:ss') |
|
UPDATE t1 SET cDATE = {ts '2010-01-23 12:23:45'} |
UPDATE t1 SET cDATE = to_date('2010-01-23 12:23:45', 'yyyy-MM-dd hh24:mi:ss') |
|
UPDATE t1 SET cDATE = {ts '2010-11-29 23:01:23.971589'} |
UPDATE t1 SET cDATE = to_date('2010-11-29 23:01:23.971589', 'yyyy-MM-dd hh24:mi:ss.ff6') |
|
CALL |
{call p1()} |
execute p1() |
{? = call p2(?)} |
execute ? := p2(?) |
|
OJ |
SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.cINT = t2.cINT} |
SELECT * FROM t1 LEFT OUTER JOIN t2 ON t1.cINT = t2.cINT |