49.4. INFORMATION_SCHEMA

简介:

49.4.1. 查询表字段

			
SELECT 
    GROUP_CONCAT(COLUMN_NAME) AS fields
FROM
    INFORMATION_SCHEMA.Columns
WHERE
    table_name = 'mytable'
        AND table_schema = 'test';
			
			

49.4.2. 列出所有触发器

			
select trigger_schema, trigger_name, action_statement from information_schema.triggers

select * from information_schema.triggers where information_schema.triggers.trigger_schema like '%test%';			
			
select * from information_schema.triggers where information_schema.triggers.trigger_name like '%trigger_name%' and information_schema.triggers.trigger_schema like '%data_base_name%';			
			
			





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
6月前
|
关系型数据库 MySQL
MySQL的INFORMATION_SCHEMA使用
MySQL的INFORMATION_SCHEMA使用
How SAP concrete schema id is got based on transaction type plus catalog type
How SAP concrete schema id is got based on transaction type plus catalog type
100 0
How SAP concrete schema id is got based on transaction type plus catalog type
|
SQL 缓存 算法
Access Path Selection in a Relational Database Management System
如果说选一篇在优化器框架上,被引用次数最多的文献,应该非这篇论文莫属了,还记得Andy Pavlo在cmu的课程中提到IBM Research的一群大神们,是怎么一人一个模块来负责System R的设计的,而关于Join order enumeration,Selinger可以说是开创了dynamic programing based 的bottom-up的搜索空间算法的先河,直至今日,很多成熟的商业或开源数据库系统仍在沿用这套框架,比如Oracle / DB2 / PostgreSQL ...
547 0
Access Path Selection in a Relational Database Management System
|
关系型数据库 MySQL 数据库
|
SQL 关系型数据库 MySQL
关于mysql中information_schema.tables
项目中出现这样一个SQL语句,现记录如下: @Select("select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.
1756 0
|
存储 关系型数据库 数据库