Getting Information on View Definitions with DESCRIBE command

You can retrieve information on view definitions using the DESCRIBE command.

 
CREATE TABLE EMP (EMPNO NUMBER(4) NOT NULL,
                  ENAME VARCHAR2(10),
                  JOB VARCHAR2(9),
                  SAL NUMBER(7, 2),
                  DEPTNO NUMBER(2));
                  
CREATE VIEW emp_view AS
SELECT *
FROM emp
WHERE sal < 1500
WITH READ ONLY CONSTRAINT emp_read_only;

SQL> DESCRIBE emp_view
 Name                                      Null?    Type
 ----------------------------------------- -------- --------------------
 EMPNO                                     NOT NULL NUMBER(4)
 ENAME                                              VARCHAR2(10)
 JOB                                                VARCHAR2(9)
 SAL                                                NUMBER(7,2)
 DEPTNO                                             NUMBER(2)

SQL>
Home »
Oracle »
Table » 

Views:
  1. Creating and Using a View
  2. Creating and Using Simple Views
  3. Performing an INSERT Using a View
  4. A View with a CHECK OPTION Constraint
  5. View with a READ ONLY Constraint
  6. Getting Information on View Definitions with DESCRIBE command
  7. Getting Information on View Definitions with user_views view
  8. Retrieving Information on View Constraints
  9. Creating and Using Complex Views
  10. Modifying a View
  11. Alter the constraints on a view using ALTER VIEW
  12. Dropping a View
Related: