skip to main content
SQL escape sequences for JDBC : Scalar functions
  

Try DataDirect Drivers Now

Scalar functions

You can use scalar functions in SQL statements with the following syntax:
{fn scalar-function}
where:
scalar-function
is a scalar function supported by the drivers, as listed in the following table.
Example:
SELECT id, name FROM emp WHERE name LIKE {fn UCASE('Smith')}
Table 44. Supported Scalar Functions
String Functions
Numeric Functions
Timedate Functions
System Functions
ASCII
BIT_LENGTH
CHAR
CHAR_LENGTH
CHARACTER_LENGTH
CONCAT
DIFFERENCE
HEXTORAW
INSERT
LCASE
LEFT
LENGTH
LOCATE
LOCATE_2
LOWER
LTRIM
OCTET_LENGTH
RAWTOHEX
REPEAT
REPLACE
RIGHT
RTRIM
SOUNDEX
SPACE
SUBSTR
SUBSTRING
UCASE
UPPER
ABS
ACOS
ASIN
ATAN
ATAN2
BITAND
BITOR
BITXOR
CEILING
COS
COT
DEGREES
EXP
FLOOR
LOG
LOG10
MOD
PI
POWER
RADIANS
RAND
ROUND
ROUNDMAGIC
SIGN
SIN
SQRT
TAN
TRUNCATE
CURDATE
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURTIME
DATEDIFF
DATE_ADD
DATE_SUB
DAY
DAYNAME
DAYOFMONTH
DAYOFWEEK
DAYOFYEAR
EXTRACT
HOUR
MINUTE
MONTH
MONTHNAME
NOW
QUARTER
SECOND
SECONDS_SINCE_MIDNIGHT
TIMESTAMPADD
TIMESTAMPDIFF
TO_CHAR
WEEK
YEAR
CURSESSIONID
DATABASE
IDENTITY
USER