How to get database structure in MySQL via query

前端 未结 10 1313
旧时难觅i
旧时难觅i 2020-11-27 11:37

Is it possible to somehow get structure of MySQL database, or just some table with simple query?

Or is there another way, how can I do it?

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 11:41

    SELECT *
    FROM INFORMATION_SCHEMA.COLUMNS 
    WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME ='products'; 
    

    where Table_schema is database name

提交回复
热议问题