background image
<< CAST expression | SelectExpression >>

Character expressions

<< CAST expression | SelectExpression >>
Derby Reference Manual
90
Expression Type
Explanation
Returns the sum of a set of numeric values.
SUM
function
LENGTH
Returns the number of characters in a character or
bit string. See
LENGTH function
.
LOWER
See
LCASE or LOWER function
.
COUNT
Returns the count of a set of values. See
COUNT
function
,
COUNT(*) function
.
Character expressions
Character expressions are expressions that result in a CHAR or VARCHAR value. Most
general expressions can result in a CHAR or VARCHAR value. The following table lists
the types of character expressions.
Table 4.
Character expressions
Expression Type
Explanation
A CHAR or VARCHAR value that
uses wildcards.
The wildcards % and _ make a character string a
pattern against which the LIKE operator can look
for a match.
Concatenation expression
In a concatenation expression, the concatenation
operator, "||", concatenates its right operand to the
end of its left operand. Operates on character and
bit strings. See
Concatenation operator
.
Built-in string functions
The built-in string functions act on a String and
return a string. See
LTRIM function
,
LCASE or
LOWER function
,
RTRIM function
,
TRIM function
,
SUBSTR function
, and
UCASE or UPPER function
.
USER functions
User functions return information about the current
user as a String. See
CURRENT_USER function
,
SESSION_USER function
, and
.
Date and time expressions
A date or time expression results in a DATE, TIME, or TIMESTAMP value. Most of the
general expressions can result in a date or time value. The following table lists the types
of date and time expressions.
Table 5.
Date and time expressions
Expression Type
Explanation
CURRENT_DATE
Returns the current date. See
CURRENT_DATE
function
.
CURRENT_TIME
Returns the current time. See
CURRENT_TIME
function
.
CURRENT_TIMESTAMP
Returns the current timestamp. See
CURRENT_TIMESTAMP function
.