--------------------------------------------------------------------------------------------------------------------------------------------------------------------
select * from(
select
table_name,
COLUMN_NAME,
COLUMN_COMMENT
from
INFORMATION_SCHEMA.Columns
where
table_schema='数据库名称' and table_name like 'xxxx' ) c1
left join (
select
table_name,
COLUMN_NAME,
COLUMN_COMMENT
from
INFORMATION_SCHEMA.Columns
where
table_schema='数据库名称' and table_name like 'xxxx'
) c
on c1.table_name=c.table_name and c1.COLUMN_NAME=c.COLUMN_NAME
where c.table_name is null ;
--------------------------------------------------------------------------------------------------------------
查询数据库备注
查看所有表和表注释
select
TABLE_NAME,
TABLE_COMMENT
from
INFORMATION_SCHEMA.Tables
where
table_schema = '某数据库名称';