Using Expressions in the VALUES Clause
With HCL OneDB™, you can insert any type of expression except a column expression into a column. For example, you can insert built-in functions that return the current date, date and time, login name of the current user, or database server name where the current database resides.
The TODAY keyword returns the system date. The CURRENT or SYSDATE
keyword returns the system date and time. The USER or CURRENT_USER
keyword returns a string that contains the login account name of the
current user. The SITENAME or DBSERVERNAME keyword returns the database
server name where the current database resides. The following example
uses built-in functions to insert data:
INSERT INTO cust_calls (customer_num, call_dtime, user_id, call_code, call_descr) VALUES (212, CURRENT, USER, 'L', '2 days');
For more information, see Expression.