DESCRIBE
Overview
The DESCRIBE
statement is used to show columns within a table as well as tables within a database.
Syntax
Below you can find the basic syntax for describing tables within a database as well as columns within tables:
where:
table_name
: name of the table that you want to show
USAGE
privilege on the schema, where the table is locatedExamples
To get a better understanding of the DESCRIBE
statement, take a look at some examples below:
DESCRIBE Table
In this example, we will figure out the columns of the part table. In order to do so, you need to run the query below:
As a result, you will get a list of column names, column types, and nullable options from the part table:
public
schema (the default schema in Oxla). You can also display tables from other schemas, by following the doc hereDESCRIBE Database
In order to describe the database, you need to execute the following query:
The output for the above code consists of all existing tables from the specified database, as presented below: