I usually use
DESC to check the columns of the table,
which is similar to
But it’s not enough espeicially when I want to check indexes with columns.
Recently, I got introduced of
SHOW CREATE TABLE.
It seems strange, but it shows the SQL for creating the table.
The result includes lot’s of unnecessary lines, and you can clean them with
\G in the end.
So, if you want to check columns and indexes of the table, you can use the following.
SHOW CREATE TABLE table\G