How to dump mysql table structure without data with a SQL query?

前端 未结 5 1683
遥遥无期
遥遥无期 2020-12-23 19:02

I need to export a mysql table, but it has like 5gb of entries, so I only want the structure. I am trying to do it from a simple php doing a sql query, how can I do that?

5条回答
  •  渐次进展
    2020-12-23 19:47

    Depending on you exact requirements, something as simple as

    select * from table where 1=0
    

    might suffice.

提交回复
热议问题