FirebirdSQL logo

'TOMORROW'

Tomorrow’s date in cast context

Type

CHAR(8), or depends on explicit CAST

'TOMORROW' is not a variable, but a string literal.It is, however, special in the sense that when you CAST() it to a date/time type, you will get the date of the next day.See also [fblangref50-contextvars-today].

Examples
select 'Tomorrow' from rdb$database
-- returns 'Tomorrow'

select cast('Tomorrow' as date) from rdb$database
-- returns e.g. 2011-10-04

select cast('TOMORROW' as timestamp) from rdb$database
-- returns e.g. 2011-10-04 00:00:00.0000

UPDATING

Indicates if the trigger fired for an UPDATE operation

Available in

PSQL — triggers only

Type

BOOLEAN

Syntax
UPDATING

Intended for use in multi-action triggers.

Example
if (inserting or updating) then
begin
  if (new.serial_num is null) then
    new.serial_num = gen_id(gen_serials, 1);
end

'YESTERDAY'

Yesterday’s date in cast context

Type

CHAR(9), or depends on explicit CAST

'YESTERDAY' is not a variable, but a string literal.It is, however, special in the sense that when you CAST() it to a date/time type, you will get the date of the day before.See also [fblangref50-contextvars-today].

Examples
select 'Yesterday' from rdb$database
-- returns 'Yesterday'

select cast('Yesterday as date) from rdb$database
-- returns e.g. 2011-10-02

select cast('YESTERDAY' as timestamp) from rdb$database
-- returns e.g. 2011-10-02 00:00:00.0000

USER

Name of the user of the current connection

Type

VARCHAR(63)

Syntax
USER

USER is equivalent to (or, alias of) [fblangref50-contextvars-current-user].

Example
create trigger bi_customers for customers before insert as
begin
  New.added_by  = USER;
  New.purchases = 0;
end