Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > INSERT >

Using Expressions in the VALUES Clause

With IBM Informix Dynamic Server, 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 keyword returns the system date and time. The 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.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]