DUMMY system table

CREATE TABLE SYS.DUMMY (
	dummy_col		 INT NOT NULL
)

The DUMMY table is provided as a 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

dummy_col Not used. It is present because a table with no columns cannot be created.

The use of the DUMMY system table is implied for all queries that do not have a FROM clause; for example, SELECT NOW();.

These queries are run by Adaptive Server Anywhere (the catalog engine), rather than by Sybase IQ. You can create a dummy table in the Sybase IQ database, for example:

CREATE TABLE iq_dummy (dummy_col INT NOT NULL);

and use this table explicitly:

SELECT NOW() FROM iq_dummy;

For more information, see FROM clause in Chapter 6, “SQL Statements.”