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 driver, as listed in the following table.
Example:
SELECT id, name FROM emp WHERE name LIKE {fn UCASE('Smith')}
Table 23. Scalar functions
String Functions
Numeric Functions
Timedate Functions
System Functions
ASCII
ABS
CURDATE
CURSESSIONID
BIT_LENGTH
ACOS
CURTIME
DATABASE
CHAR
ASIN
DATEDIFF
IDENTITY
CHAR_LENGTH
ATAN
DAY
USER
CHARACTER_LENGTH
ATAN2
DAYNAME
IFNULL
CONCAT
CEILING
DAYOFMONTH
DIFFERENCE
BITAND
DAYOFWEEK
HEXTORAW
BITOR
DAYOFYEAR
INSERT
BITXOR
EXTRACT
LCASE
COS
HOUR
LEFT
COT
MINUTE
LENGTH
DEGREES
MONTH
LOCATE
EXP
MONTHNAME
LOCATE_2
FLOOR
NOW
LOWER
LOG
SECOND
LTRIM
LOG10
TO_CHAR
OCTET_LENGTH
MOD
WEEK
RAWTOHEX
PI
YEAR
REPEAT
POWER
REPLACE
RADIANS
RIGHT
RAND
RTRIM
ROUND
SOUNDEX
SIGN
SPACE
SIN
SUBSTR
SQRT
SUBSTRING
TAN
UCASE
TRUNCATE
UPPER
ROUNDMAGIC