This is a very tricky and suspenseful error called ORA-00922 with strange detail ORA-00922: missing or invalid option.
This ORA-00922 itself shows only message code missing or invalid option. So many times people are confusing after got this typical Oracle error.
If we check error code from
|ORA-00922:||missing or invalid option|
|Cause:||An invalid option was specified in defining a column or storage clause. The valid option in specifying a column is NOT NULL to specify that the column cannot contain any NULL values. Only constraints may follow the datatype. Specifying a maximum length on a DATE or LONG datatype also causes this error.|
|Action:||Correct the syntax. Remove the erroneous option or length specification from the column or storage specification.|
We can see the message for correction of the same error is simple that check SYNTAX of executed command and correct it.
Sometimes we can get this error of missing comma (,) or missing bracket () or missing length of long datatypes. Sometimes also get the same error due to invalid datatype define in PL/SQL code. The main and important thing is only that wrong SYNTAX using in coding or SQL execution.
All the best,
Thanks and regards,
Expert Remote DBA team with low-cost remote plans.