background image
<< CURRENT DATE function | CURRENT_USER function >>

CURRENT TIME function

<< CURRENT DATE function | CURRENT_USER function >>
Derby Reference Manual
125
CURRENT SCHEMA
-- or, alternately:
CURRENT SQLID
Example
-- Set the name column default to the current schema:
CREATE TABLE mytable (id int, name VARCHAR(128) DEFAULT CURRENT SQLID)
-- Inserts default value of current schema value into the table:
INSERT INTO mytable(id) VALUES (1)
-- Returns the rows with the same name as the current schema:
SELECT name FROM mytable WHERE name = CURRENT SCHEMA
CURRENT TIME function
CURRENT TIME is a synonym for
CURRENT_TIME
.
CURRENT_TIME function
CURRENT_TIME returns the current time; the value returned does not change if it is
executed more than once in a single statement. This means the value is fixed even if
there is a long delay between fetching rows in a cursor.
Syntax
CURRENT_TIME
or, alternately
CURRENT TIME
Examples
VALUES CURRENT_TIME
-- or, alternately:
VALUES CURRENT TIME
CURRENT TIMESTAMP function
CURRENT TIMESTAMP is a synonym for
CURRENT_TIMESTAMP
.
CURRENT_TIMESTAMP function
CURRENT_TIMESTAMP returns the current timestamp; the value returned does not
change if it is executed more than once in a single statement. This means the value is
fixed even if there is a long delay between fetching rows in a cursor.
Syntax
CURRENT_TIMESTAMP
or, alternately
CURRENT TIMESTAMP
Examples
VALUES CURRENT_TIMESTAMP