Oracle不允许将null列继续修改为null

来源:互联网 发布:vscode主题 编辑:程序博客网 时间:2024/05/22 17:47
declare
visnull varchar2(4);
begin
select nullable into visnull from user_tab_columns
where table_name = upper('tblStockInspect')
and column_name = upper('FDepartID');
if visnull = 'N' then
execute immediate 'alter table tblStockInspect modify FDepartID int null‘;
end if; 
end;  
原创粉丝点击