0.背景
记录下常用的Mysql语句,持续更新,方便复制。
1.实例
-- 查看建表语句
show create table var1;
-- 查看表中的字段信息
show full columns from var1;
-- 查看那些表里有batch_id这个字段
select table_schema, table_name from information_schema.columns where column_name = 'var1';
-- 查看哪些表最近被修改了
SELECT TABLE_SCHEMA, TABLE_NAME, UPDATE_TIME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA NOT IN ('information_schema', 'mysql')
ORDER BY UPDATE_TIME DESC;
标签:语句,md,--,mysql,TABLE,table,schema
From: https://www.cnblogs.com/yang37/p/17392808.html