Contents Index System Tables RowGenerator system table

ASA SQL Reference
  System Tables

DUMMY system table


Column name Column type Column constraint Table constraints
dummy_col INTEGER NOT NULL

The DUMMY table is provided as a read-only table that always has exactly one row. This can be useful for extracting information from the database, as in the following example that gets the current user ID and the current date from the database.

SELECT USER, today(*) FROM SYS.DUMMY

Use of FROM SYS.DUMMY in the FROM clause is optional. If no table is specified in the FROM clause, the table is assumed to be SYS.DUMMY. The above example could be written as follows:

SELECT USER, today(*)

dummy_col    This column is not used. It is present because a table cannot be created with no columns.

The cost of reading from the SYS.DUMMY table is less than the cost of reading from a similar user created table because there is no latch placed on the table page of SYS.DUMMY. Further, the SYS.DUMMY table does not appear in a Lock node in the graphical plan, and if only the SYS.DUMMY table is present, a Lock node is not added.


Contents Index System Tables RowGenerator system table