![]() |
#2
yiyanxiyin2024-12-18 16:55
|
如何满足脚本中的结构化控制(如BEGIN..END,IF..THEN..END,LOOP循环,DECLARE等)?
执行库是oracle。
如:
declare
num number;
begin
/*删除表*/
select count(1) into num from user_tables where table_name = upper('TEST_EMP') ;
if num > 0 then
execute immediate 'drop table TEST_EMP cascade constraints';
end if;
end;
create table TEST_EMP ...
[此贴子已经被作者于2024-12-18 13:28编辑过]