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 This column is not used. It is present because a table cannot be created with no columns.
The
use of the DUMMY system table is implied for all queries that do
not have a FROM clause, e.g., SELECT NOW();
.
These queries are run by Adaptive Server Anywhere (the catalog engine),
rather than by IQ. You can create a dummy table in the 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 the section FROM clause in Chapter 6, “SQL Statements”.