I am trying to change a data type of a column in a Oracle View by executing the following statement:
ALTER VIEW <view_name>
MODIFY (ID VARCHAR2(100));
I get the following error:
Error starting at line : 1 in command -
ALTER VIEW <view_name>
MODIFY (ID VARCHAR2(100))
Error report -
ORA-00922: missing or invalid option
00922. 00000 - "missing or invalid option"
*Cause:
*Action:
I referred to the post here. What's the correct way to achieve this? I guess Oracle expects CONSTRAINT
keyword after MODIFY
. The column I am modifying the data type of is one of the primary keys in the table on which this view stands.