(iv) Display the structure of table CUSTOMER

Answer:

Answer by student

DESCRIBE CUSTOMER;

Detailed answer by teachoo

-lock-

To display the structure of a table in SQL, we can use the DESCRIBE statement . The syntax of this statement is:

DESCRIBE table_name;

  • In this case, we want to display the structure of the CUSTOMER table. So, we write:

DESCRIBE CUSTOMER;

  • This statement will show the following information about the CUSTOMER table:
    • Field: the name of each column in the table
    • Type: the data type of each column in the table
    • Null: whether each column can have null values or not
    • Key: whether each column is a primary key, a foreign key, or a unique key
    • Default: the default value of each column in the table
    • Extra: any extra information about each column in the table

-endlock-

Remove Ads
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.