你可以在建表之前先运行Drop table tablename
解决方案 »
- ubuntu11.10安装oracle10g出现的奇怪错误,求解
- oracle 时间条件查询
- 求一个oracle 查询语句
- 怎样给非DBA用户授dba_user表的权限
- 请问在登录企业管理器时会有二个选项:[独立运行]和[登录到ORACLE MANAGERMENT SERVER],问二者的区别.
- 这样的sql如何写:要取出某月的所有天数
- 请教个复杂的问题——关于SQL中的数字和字符串concat的问题
- 来讨论一下!
- 能不能在一个SQL的删除语句中同时对两个表进行删除?
- win7 64 oracle 11g 在官网上下载的两个文件,一起解压时有相同文件需要替换,然后安装到database assissant时出错了!
- 关于oracle9i的配置问题
- 请问9i 的 sqlplus是否必须用system登录,不能用sysman 或者 sys吗?
s integer;
Begin
select count(*) into s
from user_tables
where table_name='table_name'; if s>0 then
execute immediate 'drop table table_name';
end if;
create table ....;end;
不是有create or replace table ...吗?????
如果存在相同的对象它会自动replace撒,不是更简洁吗
Declare
s integer;
Begin
select count(*) into s
from user_tables
where table_name='table_name'; if s>0 then
execute immediate 'drop table table_name';
end if;
create table ....;end;
str varchar2(50);
Begin
begin
str:='drop table mytable';
execute immediate str;
exception
when others then
goto label;
end;
<<label>>
str:='create table ....';
execute immediate str;
end;
/