" " Examples

Click on this push button to display samples of valid SQL expressions.

You can use the following operators in an SQL expression for a computed column or a WHERE clause. All normal restrictions apply to the operators. See your database's SQL reference guide for information about additional operators and restrictions for your database.

Operators:

CONCAT
||
/
*
+
-
( )

Column functions:

AVG
COUNT
MAX
MIN
SUM

Scalar functions:

CHAR
DATE, DAY, DAYS
DECIMAL
FLOAT
HOUR
INTEGER
LENGTH
MICROSECOND
MINUTE
MONTH
SECOND
SUBSTR
TIME
TIMESTAMP
TRANSLATE
VALUE
VARGRAPHIC
YEAR

Predicate comparison operators:

=
<>
<
>
<=
>=

Predicate quantifiers:

SOME
ANY
ALL

Special registers:

CURRENT DATE
CURRENT SERVER
CURRENT TIME
CURRENT TIMESTAMP
CURRENT TIMEZONE
USER


Sample SQL expressions: