如何在 phpmyadmin 中导出不包含 id 列(AUTO_INCREMENT 列)
我的数据库结构是:
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`address` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`tel` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`longitude` int(6) NOT NULL,
`latitude` int(6) NOT NULL,
`type` varchar(1) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
因为我想备份,但我不想在导出到文件 (.sql) 时包含 id
我该怎么办?
As I want to backup, but I don't want to include id when export to file (.sql)
How can I do?
推荐答案
转到 SQL 选项卡并手动编写没有 id
列(SELECT name, address, ... FROMyour_table
).然后,一旦您获得带有结果的表格,向下滚动到页面底部,您将在灰色的查询结果操作"字段集中看到导出图标.这应该对你有用.
Go to SQL tab and manually write your select query without id
column (SELECT name, address, ... FROM your_table
).
Then once you get the table with the results, scroll down to the bottom of the page and you'll see export icon inside the gray "Query results operations" fieldset. This should work for you.
每个请求的屏幕截图(见最底部):
Screenshot per request (see very bottom):
相关文章