Add column in Oracle table
In addition,
you can add multiple columns at the same time with:
ALTER TABLE table_name ADD (column1 VARCHAR(40), column2 Date, column3 Number);
You don't need the "column" word in there, so it's:
ALTER TABLE test_id
ADD xml_column xmltype;
There is a syntax error- key COLUMN is not required before column name :
1. To add a single column:
ALTER TABLE TABLE_NAME ADD
COLUMN_NAME DATA_TYPE;
2. To add multiple columns:
ALTER TABLE TABLE_NAME ADD (
COLUMN_NAME1 DATA_TYPE1,
COLUMN_NAME2 DATA_TYPE2,
COLUMN_NAME3 DATA_TYPE3
.
.
.
);