I'm trying to delete a column from a view but can't seem to be able to do it because apparently is missing a keyword. Can someone tell me what I'm missing?
ALTER VIEW REORDERINFO DROP COLUMN name;
After trying again I got the following:
SQL> ALTER VIEW REORDERINFO
AS SELECT isbn,title, phone
FROM books JOIN publisher USING (pubid);
ERROR at line 2: ORA-00922: missing or invalid option
You cannot use ALTER VIEW
for removing a column. To recreate the view without the column, use CREATE OR REPLACE VIEW
.
From the Oracle documentation:
Use the
ALTER VIEW
statement to explicitly recompile a view that is invalid or to modify view constraints.
Source: Oracle® Database
SQL Language Reference
11g Release 2 (11.2)
E26088-01
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With