Entering content frame

This graphic is explained in the accompanying text DOMAINS Locate the document in the library structure

Prerequisites

You have generated the Structure linkdemo data for the SQL Tutorial.

Log on to the demo database instance DEMODB as user MONA.

Create domains. Proceed as described in SQL Tutorial, Structure linkDomains.

Examples

You can use the system table DOMAINS to determine the following database information, among other things:

     All domains for which the data type DATE was defined

SELECT owner, domainname
  FROM DOMAIN.DOMAINS
    WHERE datatype = 'DATE'

     All of your domains in which a default value was agreed

SELECT domainname, datatype, len, dec, "DEFAULT"
  FROM DOMAIN.DOMAINS
    WHERE owner = 'MONA'
      AND "DEFAULT" IS NOT NULL

Note that the column DEFAULT has to be defined as a special identifier (Identifier in double quotes) because DEFAULT is a reserved keyword.

Note

Constraint of a domain: see DOMAINCONSTRAINTS

Domain for column definition: see COLUMNS

 

Leaving content frame