在sql server中執行下屬語句 不會出錯
alter table grand_son add testCol varchar2(40) not null DEFAULT '**';
但是在oracle 里執行該語句時 提示 ORA-30649: 缺少 DIRECTORY 關鍵字
后發現語句 oracle 和sql server 通用的支持方法
把NOT null 放到 default 后面,就是如下寫法,sql server 和 oracle 都能正常執行
alter table grand_son add testCol varchar2(40) DEFAULT '**' not null;
alter table grand_son add testCol varchar2(40) not null DEFAULT '**';
但是在oracle 里執行該語句時 提示 ORA-30649: 缺少 DIRECTORY 關鍵字
后發現語句 oracle 和sql server 通用的支持方法
把NOT null 放到 default 后面,就是如下寫法,sql server 和 oracle 都能正常執行
alter table grand_son add testCol varchar2(40) DEFAULT '**' not null;