Skip to main content

DESCRIBE or DESC in Oracle helps to describe the structure of the table in a database. The description contains the column name, Datatype belong to that column, along its size. Also, It tells about the Nullibity of the Column, which is mentioned at the time of the creation of the table.

Syntax:

DESCRIBE Table_name;

 Table_name stands for the name of the Table.

Example - 1:

Refer to the Stu table from the previous contents:

DESCRIBE Stu;

Output:

describe

Example - 2:

Now, If we declare Roll_No Column as a Primary Key (Does not contain Null values) In the above Stu Table:

CREATE TABLE emp(Name Varchar(20),
Section Varchar(10),
Roll_No number(20),
Subject Varchar(20),
Primary Key(Roll_No));

Output

desc

Submitted by akshita.goel on September 23, 2021

Akshita, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.

About

Elix is a premium wordpress theme for portfolio, freelancer, design agencies and a wide range of other design institutions.