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 1. Supported Scalar Functions
String Functions Numeric Functions Timedate Functions System Functions
  • ASCII
  • BIT_LENGTH
  • CHAR
  • CHAR_LENGTH
  • CHARACTER_LENGTH
  • CONCAT
  • LCASE
  • LENGTH
  • LEFT 1
  • LOCATE
  • LTRIM
  • OCTET_LENGTH
  • POSITION
  • REPEAT
  • REPLACE
  • RIGHT
  • RTRIM
  • SUBSTRING
  • UCASE
  • ABS
  • ACOS
  • ASIN
  • ATAN
  • ATAN2
  • CEILING
  • COS
  • COT
  • DEGREES
  • EXP
  • FLOOR
  • LOG
  • LOG10
  • MOD
  • PI
  • POWER
  • RADIANS
  • RAND
  • ROUND
  • SIGN
  • SIN
  • SQRT
  • TAN
  • TRUNCATE
  • CURDATE
  • CURRENT_DATE
  • CURRENT_TIME
  • CURRENT_TIMESTAMP
  • CURTIME
  • EXTRACT
  • NOW
  • USERNAME
  • DBNAME
  • IFNULL
1 Supported for PostgreSQL 9.1 and higher