结束后,打一个“/”
countq number 后面应该有个分号
countq number 后面应该有个分号
解决方案 »
- oracle 10g登录问题。
- oracle问题~
- print时碰到"字符串缓冲太小"的问题,快被郁闷坏了.
- 数据库问题!!!!!!!!!!!!!!!
- 有关SQL语句,问简单的三个问题;
- 非常简单的问题
- 启动数据库出错怎么办呀?请各位大侠指点一下。
- 怎样正确的链接两个字符串?谢谢!100分敬上
- ★★拣分了!这样的SQL 语句如何写?(oracle 7.3.4)★★
- postgres 数据库如何写循环
- 分析一下这个ORA-01747: invalid user.table.column, table.column, or column specification
- decode函数的使用?如何使用的,它各个参数间的关系如何?
as
countq number
begin
select count(table_name) into countQ from all_tables where table_name='test';
if(countQ>0) then
execute immediate 'drop table test';
end if;
end;
/
多了个declare;
if语句少了一个then;
if结束少了一个end if;
drop table……不能直接这样写。
现在还有一个问题是,为什么这个存储过程成功的执行了之后,test表还存在呢?
……where table_name='TEST';
试试
SQL> select * from all_tables where table_name='test';未选定行但是如果我用
select * from test却能从这个表中读出相应的记录。不知何故,我是最近才开始接触Oracle的,感谢不吝赐教!