通过SHOW TABLE STATUS查询选择特定列

问题描述 投票:3回答:1

我必须通过SHOW TABLE STATUS查询选择特定的列。现在它看起来像:

SHOW TABLE STATUS IN  `myTableName` WHERE  `NAME` LIKE  '%name_substring%';

...并返回所有列。有没有办法达到这个目标?

mysql status
1个回答
4
投票

您可以查询information_schema.TABLES以获取特定列。检查演示:http://sqlfiddle.com/#!2/38506/3

SELECT * FROM information_schema.TABLES WHERE TABLE_NAME = 'myTableName';

希望这可以帮助

© www.soinside.com 2019 - 2024. All rights reserved.