查询某一字段在那那些表含有
select * from INFORMATION_SCHEMA.columns where COLUMN_TYPE Like '%time%' and TABLE_SCHEMA='ezc';
#生成修改该直段的sql
SELECT 1,
concat(
'alter table ',
table_schema, '.',
table_name,
' modify column ',
column_name,
' datetime(3) ',
if(is_nullable = 'YES', 'null ', 'not null '),
' default ',
if(column_default IS NULL, 'null', 'CURRENT_TIMESTAMP(3)' ),
' comment ''',
column_comment,
''';'
) s
from INFORMATION_SCHEMA.columns where COLUMN_TYPE Like '%time%' and TABLE_SCHEMA='ezc';