Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将列 validFrom 添加到我的表中
这是我的查询
alter table mytable add validFrom date default getdate() not null
我收到类似的错误
ORA-04044: procedure, function, package, or type is not allowed here
请帮忙
Oracle 没有getdate()功能——通过查看手册很容易找到。
getdate()
您需要使用SYSDATE或CURRENT_DATE
SYSDATE
CURRENT_DATE
ALTER TABLE mytable ADD (validFrom date DEFAULT sysdate);