Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | 云栖社区 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Github | Search | About

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%';