if exists(select table_name) from all_tables where table_name="BANNER")
DROP TABLE "BANNER"
CREATE TABLE "A"."BANNER"(........)
报错
ORA-00900:无效SQL语句
请问这是什么问题啊
DROP TABLE "BANNER"
CREATE TABLE "A"."BANNER"(........)
报错
ORA-00900:无效SQL语句
请问这是什么问题啊
解决方案 »
- 初学oracle。应该选什么书?
- 遇到IMP-00017: following statement failed with ORACLE error 1
- 求字符串合并问题,谢谢
- ado打开Oracle的程序的路径为什么不能包含右括号')'
- 求一条sql语句,不用存储过程
- SQL语句里边的distinct函数是什么意思?
- 哪位大蝦 能給我詳細講一講CONNECT BY的用法,還有 CONNECT BY ROWNUM 和 CONNECT BY LEVEL的區別,謝謝
- Toad for Oracle中的登录界面上的问题
- 怎样写语句把数据库的结构导入到txt文件里。或者导出一个备份文件?
- 请问什么地方有linux 下 oracle 9 的c 语言的API 库下载
- 求一个oracle 触发器
- 跪求一个 oracle OMS配置和使用方法
pl/sql里if ... then ... endif;
sql里case when ... then ... end case;
v_cnt number(20);
begin
select count(*) into v_cnt from all_tables where table_name='BANNER';
if v_cnt>0 then
execute immediate 'drop table BANNER';
end if;
execute immediate 'create table BANNER as select 1 a from dual';
end;
然后在用动态sql创建表。
又是mssql转oracle 的 呵呵
declare
num number;
begin
select count(1) into num from dba_tables where table_name='BANNER';
if num>0 then
execute immediate 'drop table BANNER';
end if;
execute immediate 'create table BANNER(....)';
end;
我用这个语句 还是报错啊
ORA-06550;第25行,第3列:
PLS-00103:出现符号"DROP"在需要下列之一时:
begin case declare end
exception exit for oto if loop mod null pragma raise return
select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe[Err] declare
num number;
begin
select count(1) into num from dba_tables where
table_name='BANNER';
if num>0 then
execute immediate 'drop table BANNER';
end if;
execute immediate ' CREATE TABLE "A"."BANNER"(........)' ;
execute immediate 'drop table BANNER';BANNER 此表的所属用户
execute immediate 'drop table 创建此表的所属用户.BANNER';
begin case declare end
exception exit for oto if loop mod null pragma raise return
select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe你全部的代码贴出来