How to get all columns' names for all the tables in MySQL?

前端 未结 10 2320
你的背包
你的背包 2020-11-28 01:13

Is there a fast way of getting all column names from all tables in MySQL, without having to list all the tables?

10条回答
  •  一生所求
    2020-11-28 02:00

    To list all the fields from a table in MySQL:

    select * 
      from information_schema.columns 
     where table_schema = 'your_DB_name' 
       and table_name = 'Your_tablename'
    

提交回复
热议问题