997icu

declare v_Count1 int := 0;
v_Count2 int := 0;
begin
select count(1) into v_Count1 from user_all_tables where Upper(Table_Name) = Upper(\'LSZGZD\');
if(v_Count1 > 0 ) then
select count(1) into v_Count2 from user_tab_cols where Upper(Table_name) = Upper(\'LSZGZD\') and Upper(Column_Name) = Upper(\'LSZGZD_CODE\');
if(v_Count2 <= 0 ) then
execute immediate(\'alter table LSZGZD add LSZGZD_CODE varchar2(36) \');
end if;
end if;
end;
go
declare v_Count1 int := 0;
v_Count2 int := 0;
begin
select count(1) into v_Count1 from user_all_tables where Upper(Table_Name) = Upper(\'LSZGZD\');
if(v_Count1 > 0 ) then
select count(1) into v_Count2 from user_tab_cols where Upper(Table_name) = Upper(\'LSZGZD\') and Upper(Column_Name) = Upper(\'LSZGZD_TYPE\');
if(v_Count2 <= 0 ) then
execute immediate(\'alter table LSZGZD add LSZGZD_TYPE varchar2(240) \');
end if;
end if;
end;
go

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-12
  • 2022-02-27
  • 2022-01-13
  • 2021-12-21
  • 2022-12-23
  • 2021-09-29
  • 2022-02-19
猜你喜欢
  • 2022-01-24
  • 2021-12-07
  • 2021-11-21
  • 2022-12-23
  • 2021-12-24
  • 2021-12-03
  • 2022-01-08
相关资源
相似解决方案