Search code examples
sqloracle-databasesyntaxalter-tableora-00905

Oracle error : ORA-00905: Missing keyword on ALTER TABLE


I'm getting the error ORA-00905: Missing keyword with line:

ALTER TABLE Z_Paper_ObjTable ADD SCOPE FOR (institute) IN Z_Institute_ObjTable;

Table Z_Paper_ObjTable has an attribute institute REF Z_Institute_ObjType.

Can anyone help me please?


Solution

  • According to the alter table docs, the correct syntax would be:

    ALTER TABLE Z_Paper_ObjTable ADD (SCOPE FOR (institute) IS Z_Institute_ObjTable);
    

    Parens not optional, and is rather than in.