用pl/sql:select count(*) into variable from DBA_TABLES where table_name='youname';
if variable > 0 --存在这个表
then
drop table youname;
create table youname(.....);
else -- 不存在
create table youname(.....);
end if电子书www.oradb.net去看看。
if variable > 0 --存在这个表
then
drop table youname;
create table youname(.....);
else -- 不存在
create table youname(.....);
end if电子书www.oradb.net去看看。
解决方案 »
- oracle里的 “” 和 NULL 有没有区别呢??
- 各位牛人帮忙设计下这个BT的树形表---2
- oracle导入导出
- oracle中事务处理问题请教
- 简单sql问题,在线等!谢 请高手帮忙!
- 什么样的语句可以不放在begin end块中
- 请各位高手大侠帮我这个新手解决这道难题...十分感谢的说!!!还有是全英文的..麻烦各位帮帮忙哦..很重要的啊!!
- SELECT 语句出错,哪能办?ORA-01555、ORA-02063
- 送分大行动,请问大家如何在ORACLE9I当中创建方案(数据库)?
- 如何转移数据库实例
- 哪位大哥帮帮忙?急
- 在ORACLE的过程中,我创建一个表,在存储过程中我怎么样才能调用这个表??
楼上的方法可以检测是否存在某个表,注意表名大写
下面是一些电子书籍的下载地址
http://www.nci.ac.cn/cgi-bin/view.cgi?forum=2&topic=65
http://www.pcbookcn.com/content.asp?Nclassid=22&classid=3
http://superexam.myetang.com/ocp/index.html
http://soft.269.net/SoftWareList.asp?ClasstreePos=24
http://www.oradb.net/book.htm
http://flying.swpi.edu.cn/books/dnwl/cxsj/oracle/index.html
http://easycome.myrice.com/bookstore/oracle.htm
http://www.kl.gz.cn/~hal/1-1-8.htm
http://www.ebooksou.com/search_leibie.asp?lei=4-2&word=Oracle
http://www.eng.stu.edu.cn/ebook/type/database.asp?did=0203
http://www.helpwork.net/
http://www.powerba.com/develop/database/oracle/index_12.htm
而且‘into variable ’pl/sql好象不认