SQL DESC Statement (Describe Table)
SQL DESC statement use for describe the list of column definitions for specified table. You can use either DESC or DESCRIBE statement. both are return same result.
DESCRIBE statement to get following information:
- Column Name
- Column allow NULL or NOT NULL
- Datatype of the Column
- With database size precision and If NUMERIC datatype scale.
SQL DESC Syntax
SQL DESCRIBE Table Column use following syntax,
DESC table_name
SQL DESC Example
SQL> DESC users_info;
Name Null? Type
------------------------------ -------- ----------------------------
NO NOT NULL NUMBER(3)
NAME VARCHAR2(30)
ADDRESS VARCHAR2(70)
CONTACT_NO VARCHAR2(12)
SQL DESCRIBE Syntax
DESCRIBE table_name
SQL DESCRIBE Syntax
SQL> DESCRIBE users_info;
Name Null? Type
------------------------------ -------- ----------------------------
NO NOT NULL NUMBER(3)
NAME VARCHAR2(30)
ADDRESS VARCHAR2(70)
CONTACT_NO VARCHAR2(12)