IBM Books

SQL Getting Started


Special Registers

A special register is a storage area that is defined for a connection by the database manager and is used to store information that can be referenced in SQL statements. Following are a few examples of the more commonly used special registers. For a list of all the special registers and more detailed information refer to the SQL Reference.

You can display the contents of a special register with the VALUES statement. For example:

     VALUES (CURRENT TIMESTAMP)

You could also use:

     SELECT CURRENT TIMESTAMP FROM ORG

and this will return the TIMESTAMP for every row entry in the table.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]