MySQL Show Datadictionary of tables

前端 未结 6 1287
悲&欢浪女
悲&欢浪女 2021-01-13 09:40

I\'d like to show DataDictionary for entire tables in database.

SHOW COLUMNS
FROM `MyDataBase`.`MyTables` 
WHERE IN ( SELECT TABLE_NAME 
           FROM info         


        
6条回答
  •  萌比男神i
    2021-01-13 10:22

    From MySQL 5.7 Manual

    Many sections indicate what SHOW statement is equivalent to a SELECT that retrieves information from INFORMATION_SCHEMA. For SHOW statements that display information for the default database if you omit a FROM db_name clause, you can often select information for the default database by adding an AND TABLE_SCHEMA = SCHEMA() condition to the WHERE clause of a query that retrieves information from an INFORMATION_SCHEMA table.

提交回复
热议问题