findobj
来源:互联网 发布:快搜 知乎 编辑:程序博客网 时间:2024/05/18 16:16
CREATE DEFINER = 'lijiwei'@'192.168.16.33'PROCEDURE ayst_share.findobj(IN v_object_name VARCHAR(255))BEGIN/* FUNCTION: 该程序的设计目标是,当技术人员输入一个数据库对象(表名、字段名、约束名、索引名、存储过程名等等)时, 可以智能化显示出用户所输入的对象的相关信息(假如该对象在数据库中存在的话)。以便技术人员快速地获取相关对象 的定义,方便解决相关问题。 created date: 2016/9/29 */if (select 1 from information_schema.SCHEMATA where schema_name=v_object_name )then select * from information_schema.SCHEMATA where schema_name=v_object_name ;end if ;if (select 1 from information_schema.ROUTINES where routine_name=v_object_name limit 1) thenselect * from information_schema.ROUTINES where routine_name=v_object_name ;end if ;if (select 1 from information_schema.tables where table_name=v_object_name limit 1) thenselect * from information_schema.tables where table_name=v_object_name ;end if ;if (select 1 from information_schema.columns where column_name=v_object_name limit 1 )thenselect * from information_schema.columns where column_name=v_object_name ; end if ;if (select 1 from information_schema.table_constraints where constraint_name=v_object_name limit 1) thenselect * from information_schema.table_constraints where constraint_name=v_object_name ;end if ;if (select 1 from information_schema.TRIGGERS where trigger_name=v_object_name limit 1)thenselect * from information_schema.TRIGGERS where trigger_name=v_object_name ;end if ;if (select 1 from information_schema.VIEWS where table_name=v_object_name limit 1)thenselect * from information_schema.VIEWS where table_name=v_object_name ; end if ;if (select 1 from information_schema.KEY_COLUMN_USAGE where constraint_name=v_object_name or column_name=v_object_name limit 1 ) then select * from information_schema.KEY_COLUMN_USAGE where constraint_name=v_object_name or column_name=v_object_name ;end if ;END
0 0
- findobj
- 【小程序】findobj
- findobj函数小记
- matlab的findobj函数
- obj type using in findobj
- 重写findobj【可以遍历子文件夹】
- 杂项:地址,日期
- 51Nod-1491-黄金系统
- Filter
- 图解Linux命令之--shutdown命令
- mysql findcode
- findobj
- 请将MYSQL的PRIMARY KEY 替换为UNIQUE NOT NULL
- 初探汇编
- ES6折腾记- let/const块级变量及块作用域
- web应用的入口:web.xml核心配置文件详解
- 小水怪微信爬虫(8)
- Linux下的文本网页浏览器
- 深度解读Adblock plus经历与底层算法实现
- AdBlock广告拦截插件的实现原理