SQL Invalid ALTER TABLE option
14,128
DATETIME
is not a valid column data type. If you're trying to add a default value, you need to specify a DEFAULT
.
If you are trying to use a date format, please use one of the datetime or interval data types. If you need to store date and time, the standard DATE
format stores year, month, day, hour, minutes, and seconds.
Author by
Sean
Updated on June 04, 2022Comments
-
Sean almost 2 years
With the following SQL statement:
ALTER TABLE USERS ADD LAST_LOGIN DATETIME()
I am receiving the error below:
Error report - SQL Error: ORA-01735: invalid ALTER TABLE option 01735. 00000 - "invalid ALTER TABLE option" *Cause: *Action:
I cannot for the life of me understand why SQLDeveloper does not like the fromatting of my rather simple alter table command.