Contents Index SQLSTATE special value USER special value

ASA SQL Reference
  SQL Language Elements
    Special values

TIMESTAMP special value


Function 

TIMESTAMP indicates when each row in the table was last modified. When a column is declared with DEFAULT TIMESTAMP, a default value is provided for inserts, and the value is updated with the current date and time whenever the row is updated.

Data type 

TIMESTAMP

Description 

Columns declared with DEFAULT TIMESTAMP contain unique values so that applications can detect near-simultaneous updates to the same row. If the current timestamp value is the same as the last value, it is incremented by the value of the DEFAULT_TIMESTAMP_INCREMENT option.

You can automatically truncate timestamp values in Adaptive Server Anywhere based on the DEFAULT_TIMESTAMP_INCREMENT option. This is useful for maintaining compatibility with other database software which records less precise timestamp values.

The global variable @@dbts returns a TIMESTAMP value representing the last value generated for a column using DEFAULT TIMESTAMP.

See also 

TIMESTAMP data type [Date and Time]

CURRENT UTC TIMESTAMP special value

DEFAULT_TIMESTAMP_INCREMENT option [database]

TRUNCATE_TIMESTAMP_VALUES option [database]


Contents Index SQLSTATE special value USER special value