mysql 常用语句系列
- 去重语句
select * from people
where people_no in
(select people_no from people group by people_no having count(people_no) > 1);
- 根据数据库名获取到表和表备注
SELECT TABLE_NAME,TABLE_COMMENT FROM information_schema.TABLES
WHERE table_schema='datacenter';
- 根据数据库名,表名获取到字段名称和字段描述
SELECT column_name,
column_comment FROM information_schema.columns
WHERE table_schema ='datacenter' AND table_name = 'lineage_path';