Anil
Anil

Reputation: 603

ORA-01735: invalid ALTER TABLE option (While trying to change DEFAULT on a COLUMN)

I was trying to change the default value of a column from Y to N. I exactly use the SQL

ALTER TABLE myschema.emp ALTER COLUMN is_active DEFAULT 'Y';

as mentioned at https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj81859.html but was getting following error

Error report -
ORA-01735: invalid ALTER TABLE option
01735. 00000 -  "invalid ALTER TABLE option"
*Cause:    
*Action:

Upvotes: 0

Views: 5888

Answers (1)

clinomaniac
clinomaniac

Reputation: 2218

Try to follow this syntax. I believe you need to put the data type there.

    alter table foo modify( col2 varchar2(10) default 'foo' );

Upvotes: 1

Related Questions