How to alter column size of a view in Oracle

后端 未结 2 1300
花落未央
花落未央 2021-01-24 02:58

I am trying to alter the column size of a view with the same command that we use for table like :

alter table 
STUDENT
modify (
    ROLL_NO VARCHAR2(80)
);
         


        
2条回答
  •  天命终不由人
    2021-01-24 03:51

    Here is the procedure that I followed :

    1- First find the base table for that view by running the following query

    SELECT * FROM DBA_DEPENDENCIES
    WHERE OWNER = ''
    AND NAME = ''
    AND TYPE = 'VIEW';
    

    2- Above query will you a table where you will find the base table under the column name 'REFERENCED_NAME'.

    3- Now Change the column size of that base table.

    NOTE: The view can be made up of 1 or more than 1 tables, so you need to change the column size of all those base tables.

提交回复
热议问题