Describe statement show columns within a table and tables within a database.
The Describe statement is recommended to use before creating a new table to avoid duplicate tables.
Below is the basic syntax for describing tables within a database:
Below is the basic syntax for describing columns within a table:
table_name is the name of the table that you want to show.
To get a better understanding of a DESCRIBE statement, take a look at some examples below:
1) In this example, we will figure out the columns of a part table. Run the query below:
2) As a result, you will get a list of column names, column types, and nullable options from the part table.
1) Execute the following query to describe the database:
2) You will retrieve a list of the existing tables in the database as shown below: