检查表是否存在
2015-11-23 16:42
323 查看
--检查表是否存在 function is_tab_exist(v_tab_name varchar2,v_dblink_name varchar2 default null) return boolean as n_count number default 0; b_result boolean default false; begin --在用户表中查询 execute immediate 'select count(1) from user_tables'||case when v_dblink_name is not null then '@'||v_dblink_name end||' where table_name=upper('''||v_tab_name||''')' into n_count; if n_count > 0 then b_result := true; end if; return b_result; exception when others then return false; end is_tab_exist;
相关文章推荐
- 第十三周项目2—最小生成树的Kruskal算法
- 第十二周 项目4-利用遍历思想求解图问题(4)
- 最小生成树的普里姆算法
- unicode下的SetWindowTextW------unicode最好不要与C代码一起使用
- myslq backup
- python 学习 (type)
- Android开发进阶系列(四) 左移拉出Menu菜单界面布局
- 关于文件操作
- 相离之后,更莫相憎;一别两宽,各生欢喜
- ElasticSearch部署
- 4. Java Script 变量(untype)
- jquery 清除style样式
- SQL Server的master数据库是干什么的?
- 算法——动态规划算法求解字符串的编辑距离
- Linux-虚拟机下设置静态IP
- autolayout
- HTML5 自学 (一)
- 带搜索框的百度地图html
- Android学习----AndroidManifest.xml文件解析
- 杂谈