I was trying to add a column named 'description' to the table named 'building.
ALTER TABLE building ADD COLUMN description varchar(255) NOT NULL;
Im getting this error as :
SQL ERROR: ALTER TABLE building ADD COLUMN description VARCHAR(255) NOT NULL * ERROR at line 1: ORA-00904: : invalid identifier
i googled my problems, even tried gpts
As shown in the syntax diagrams, you should not have the
COLUMNkeyword - that is being seen as the column name, and is a reserved word, so it indeed an invalid identifier.It should just be:
fiddle
As commented, consider using
varchar2instead ofvarcharas Oracle recommends, though they're synonymous at the moment (they've been threating for them to diverge for 30+ years...)