Was this helpful?
OpenSQL Constants
OpenSQL provides the following constants:
Special Constant
Meaning
now
Current date and time. Specify this constant in quotes only for servers and Enterprise Access products that support the date data type.
null
Indicates a missing or unknown value in a table.
today
Current date. Specify this constant in quotes. Valid only for servers and Enterprise Access products that support the date data type.
user
Effective user for the current session (the host DBMS user identifier, not the operating system user identifier).
These constants can be used in queries and expressions. For example:
select date('now');
insert into sales_order 
(item_number, clerk, billing_date)
values ('123', user, date('today'));
Last modified date: 01/30/2023