业务场景
1.表中字段较多
2.查询不需要表中某个字段的数据
语句如下:
SELECT
CONCAT(‘ select ‘,GROUP_CONCAT(COLUMN_NAME),‘ from ‘, TABLE_NAME,‘ ;‘)
FROM information_schema.COLUMNS WHERE table_name = ‘test‘ AND TABLE_SCHEMA = ‘ems‘ and COLUMN_NAME != ‘ID‘; #忽略条件
原文:https://www.cnblogs.com/zhs0/p/10521149.html