Categories:
Table, View, & Sequence DDL

DESCRIBE MATERIALIZED VIEW

Describes the columns in a materialized view.

DESCRIBE can be abbreviated to DESC.

See also:
CREATE MATERIALIZED VIEW , SHOW MATERIALIZED VIEWS

Syntax

DESC[RIBE] MATERIALIZED VIEW <name>

Parameters

name
Specifies the identifier for the materialized view to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Usage Notes

  • The command output does not include the view definition. To see the materialized view’s definition, use SHOW MATERIALIZED VIEWS or GET_DDL.
  • DESC MATERIALIZED VIEW and DESCRIBE TABLE are interchangeable. Either command retrieves the details for the table or view that matches the criteria in the statement.
  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Examples

Example setup:

CREATE MATERIALIZED VIEW emp_view
    AS
    SELECT id "Employee Number", lname "Last Name", location "Home Base" FROM emp;

Describe the materialized view:

DESC MATERIALIZED VIEW emp_view;

+-----------------+--------------+--------+-------+---------+-------------+------------+-------+------------+---------+
| name            | type         | kind   | null? | default | primary key | unique key | check | expression | comment |
|-----------------+--------------+--------+-------+---------+-------------+------------+-------+------------+---------|
| Employee Number | NUMBER(38,0) | COLUMN | Y     | NULL    | N           | N          | NULL  | NULL       | NULL    |
| Last Name       | VARCHAR(50)  | COLUMN | Y     | NULL    | N           | N          | NULL  | NULL       | NULL    |
| Home Base       | VARCHAR(100) | COLUMN | Y     | NULL    | N           | N          | NULL  | NULL       | NULL    |
+-----------------+--------------+--------+-------+---------+-------------+------------+-------+------------+---------+