Best Practice to Check Table Information in MySQL

I usually use DESC to check the columns of the table, which is similar to EXPLAIN. 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.

By @soundlake in
Tags : #MySQL, #MariaDB,

Comments !