srgg6701
srgg6701

Reputation: 2048

Select specific columns by SHOW TABLE STAUS query

I have to select specific columns by the SHOW TABLE STATUS query. Now it looks like:

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

...and returns all columns. Is there any way to reach that goal?

Upvotes: 5

Views: 5252

Answers (1)

Anda Iancu
Anda Iancu

Reputation: 530

You can query information_schema.TABLES in order to get specific columns. Check demo: http://sqlfiddle.com/#!2/38506/3

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

Hope this helps

Upvotes: 6

Related Questions