Use the DESCRIBE statement to get details of a database object.
Parameters, clauses, keywords, and variables
▪ format‑option: Determines the output format:
– NICE: Format that is brief and simplified and useful for ad-hoc queries over the metadata of the database.
– RAW: Format that is more specific and more verbose. It outputs information that would normally be acquired by using solidDB Data Dictionary (soldd) or complex SQL queries.
Note In many cases, only a single output format is available. In those cases, the output format that is available is produced despite the output format that is specified by the user.
▪ type-option: Details the database object
– CATALOGcatalog: (NICE format) Prints the catalog name, the creator, the owner, and the list of schemas in the specified catalog.
– CREDENTIALS: (NICE format) Returns the authentication token for the user who runs the statement. The statement is always successful. All users have privileges to run the statement. If you use external authentication, you must use the DESCRIBE CREDENTIALS USINGpassword format of the statement.
– SCHEMA schema: (NICE format) Prints the schema name, the catalog name to which it belongs, the creator and the owner.
– TABLE table:
▪ (NICE format) 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 secondary key.
▪ (RAW format) Prints the CREATE TABLE statement and the CREATE statements of associated indexes and constraints.
– VIEW view:
▪ (NICE format) Prints the columns of the view
▪ (RAW format) Prints the CREATE VIEW statement.
– PROCEDURE procedure: (RAW format) Prints the CREATE PROCEDURE statement.
– FUNCTION function: (RAW format) Prints the CREATE FUNCTION statement.
– TRIGGER trigger: (RAW format) Prints the CREATE TRIGGER statement.
Examples
The following example outputs the user credentials.