After MySQL installation is successful, you can see that there are already several databases of MySQL, INFORMATION_SCHEMA and test, the INFORMATION_SCHEMA library has a table named columns, which records field information for all tables in the database. Once you know the table, you need only one SELECT statement to get the fields for any table.
For example: SELECT column_name from INFORMATION_SCHEMA. COLUMNS WHERE table_name = ' your_table_name '; this is a bit of a problem, if there are multiple databases where you want to query the name of the table, then the results of the query will include all the field information.
Through the DESC information_schema. Columns can see that the column named Table_schema in the table is the record database name, so the following is more rigorous: SELECT column_name from INFORMATION_SCHEMA. COLUMNS WHERE table_name = ' your_table_name ' and table_schema = ' your_db_name ';
MySQL Operation highlights