SQL*Plus Desc Command

Desc or Describe Command 

Desc or Describe Command:- Describe command is used to see the structure of table,view and synonym.It show column name, null type and datatype of column. It is also used to see the argument details of function, procedure and package.

Note:- Desc or Describe is a SQL*Plus command.

Examples:- If "course" is a table name then we can see the structure of course table by below command

SQL>desc course;
SQL>describe course;



Note:- Desc and Describe , both are same command.
                          
SQL>select * from user_views;
SQL>desc semp;
SQL>select * from user_synonyms;
SQL>desc vemp;

Desc for Function, Procedure and Package:-
 
SQL>select * from user_objects where OBJECT_TYPE like '%FUNCTION%';
SQL>desc ADD1;




SQL>select * from user_objects where OBJECT_TYPE like '%PROCEDURE%';
SQL>desc DELETE_EMP;
SQL>select * from user_objects where OBJECT_TYPE like '%PACKAGE%';
SQL>desc ENCRYPTDECRYPT;


No comments:

Post a Comment