Bug #24652 SELECT Field FROM (SHOW COLUMNS FROM table) AS s
Submitted: 28 Nov 2006 13:23 Modified: 1 Dec 2006 15:21
Reporter: Hans Ginzel Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.26-community-nt OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: "SELECT FROM SHOW", "SHOW COLUMNS"

[28 Nov 2006 13:23] Hans Ginzel
Description:
SELECT Field FROM (SHOW COLUMNS FROM test.table) AS s;

returns

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
 for the right syntax to use near 'SHOW COLUMNS FROM bce4.credit_info) as s' at line 1

How to repeat:
CREATE TABLE test.table (a int);
SELECT Field FROM (SHOW COLUMNS FROM test.table) AS s;

Suggested fix:
SHOW and DESC shuld behave like SELECT
[1 Dec 2006 15:21] Valeriy Kravchuk
Thank you for a feature request. I do not think that this feature is needed. Now we have INFORMATION_SCHEMA (http://dev.mysql.com/doc/refman/5.0/en/information-schema.html) for queries like that.