SQL Guide : solidDB® SQL statements : DESCRIBE
  
DESCRIBE
DESC[RIBE] [type option] {[context_specifier.]object}
   [format option]
where
type option := CATALOG | SCHEMA | TABLE | VIEW | PROCEDURE |
   FUNCTION | TRIGGER
context_specifier := catalog | [catalog.]schema |    [[catalog.]schema.]
table object := catalog | schema | table | view | procedure |    function | trigger
format
option := [NICE (default) | RAW ]
Usage
The DESCRIBE statement describes a database object, such as catalog, schema, table, view, procedure, or function: it prints the column definitions for the specified table or view, or the specifications for the specified function or procedure.
The result of DESCRIBE depends of the output format, NICE or RAW.
NICE format is brief and simplified. It can be used to make quick ad-hoc queries over the metadata of the database.
RAW format is more specific and more verbose. It outputs information that would normally be acquired by using solidDB® Data Dictionary (soldd) or complex SQL queries.
Both NICE and RAW formats are not available for all types.
DESCRIBE CATALOG my_catalog
prints the table name, the creator, the owner and the list of schemas of the specified catalog in NICE format.
DESCRIBE SCHEMA my_schema
prints the schema name, the catalog name to which it belongs, the creator and the owner in NICE format.
DESCRIBE TABLE my_table
prints the table name, the storage type used, list of parent tables, list of child tables, columns, column types, column precisions, column nullability, whether column is primary key and whether column is sec key in NICE format. In RAW format, the create statement is printed along with create statements of associated indexes and constraints.
DESCRIBE VIEW my_view
prints the columns of the view in NICE format and the create statement in RAW format.
DESCRIBE PROCEDURE my_procedure
prints the create statement in the RAW format.
DESCRIBE FUNCTION my_function
prints the create statement in the RAW format.
DESCRIBE TRIGGER my_trigger
prints the create statement in the RAW format.
Note In many cases, there is only single output format available. In those cases, the only output available is produced despite the output format specified by the user.
Examples
The following example outputs information on a table named PERSON in NICE format.
DESCRIBE PERSON;
  Table name : PERSON
  Table type : In-memory
  Memory usage: 7935 KB (total), 7925 KB (active), 6192 KB
        (rows), 1733 KB (indexes).
  Parent tables : CITY
  Child tables : OWNER, IN_RELATION

COLUMN   TYPE     PRECISION  NULLABLE  PRIMARY KEY  SECONDARY KEY

FIRSTNAME VARCHAR  30         YES       NO           NULL
LASTNAME VARCHAR  60         NO        YES          NULL
HOME_CITY INT      NULL       YES       NO           
'CITY'
1 rows fetched.
The following example outputs information about a table named PERSON in RAW format.
DESCRIBE PERSON RAW;
  CREATE TABLE "DBA"."DBA"."PERSON" (
    "FIRSTNAME" VARCHAR(30),
    "LASTNAME" VARCHAR(60) NOT NULL,
    "HOME_CITY" INTEGER,
    FOREIGN KEY("HOME_CITY")
        REFERENCES "DBA"."DBA"."CITY"("CITY"),
    PRIMARY KEY ("LASTNAME") );
1 rows fetched.
See also
solidDB® SQL statements