background image
<< RTRIM function | SMALLINT function >>

SIGN function

<< RTRIM function | SMALLINT function >>
Derby Reference Manual
138
SESSION_USER function
When used outside stored routines, SESSION_USER,
USER
, and
CURRENT_USER
all
return the authorization identifier of the user that created the SQL session.
SESSION_USER also always returns this value when used within stored routines.
If used within a stored routine created with EXTERNAL SECURITY DEFINER, however,
USER and CURRENT_USER return the authorization identifier of the user that owns the
schema of the routine. This is usually the creating user, although the database owner
could be the creator as well.
For information about definer's and invoker's rights, see
CREATE PROCEDURE
statement
or
CREATE FUNCTION statement
.
Syntax
SESSION_USER
Example
VALUES SESSION_USER
SIGN function
The SIGN function returns the sign of the specified number.
The specified number is the number you want the sign of. The specified number must be
a
DOUBLE PRECISION
number.
The data type of the returned value is
INTEGER
.
· If the specified number is NULL, the result of this function is NULL.
· If the specified number is zero (0), the result of this function is zero (0).
· If the specified number is greater than zero (0), the result of this function is plus one
(+1).
· If the specified number is less than zero (0), the result of this function is minus one
(-1).
Syntax
SIGN ( number )
SIN function
The SIN function returns the sine of a specified number.
The specified number is the angle, in radians, that you want the sine for. The specified
number must be a
DOUBLE PRECISION
number.
· If the specified number is NULL, the result of this function is NULL.
· If the specified number is zero (0), the result of this function is zero.
The data type of the returned value is a DOUBLE PRECISION number.
Syntax
SIN ( number )
SINH function
The SINH function returns the hyperbolic sine of a specified number.