Jack Daniel's Jack Daniel's - 1 year ago 62
MySQL Question

Difference between show column and describe in mysql?

Is there any difference between in MYSQL:-

SHOW COLUMNS from XYZ;


AND

DESC XYZ;


Both seems to give same result

Answer Source

The source of information in situations like this is the documentation

EXPLAIN Syntax
DESCRIBE is a shortcut for SHOW COLUMNS.
...
The DESCRIBE statement is provided for compatibility with Oracle.

Both provide means for column name pattern matching

SHOW COLUMNS FROM users LIKE '%name';
DESC users '%name';

Here is SQLFiddle demo