php phpMyAdmin 重复表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13210429/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 04:59:28  来源:igfitidea点击:

phpMyAdmin Duplicate Table

phpdatabasephpmyadmin

提问by I wrestled a bear once.

Is there some way to get phpMyAdmin to spit out the SQL needed to duplicate the table in another DB?

有什么方法可以让 phpMyAdmin 吐出在另一个数据库中复制表所需的 SQL?

I saved it when I initially made the table but I've changed it quite a bit since then. It's a pretty big table and this would really help.

我在最初制作表格时保存了它,但从那时起我已经对其进行了相当多的更改。这是一张非常大的桌子,这真的很有帮助。

回答by Havelock

Yes, you can navigate to the table you want and then go to (tab) Operations> Copy table to (database.table):, which is a box on the right hand side. There you can define into which database and under what name you'd like to copy your table. After having done than you get the SQL "spat out".

是的,您可以导航到所需的表,然后转到 (选项卡)操作>将表复制到 (database.table):,这是右侧的一个框。在那里您可以定义要将表复制到哪个数据库中并以什么名称复制。完成后,您会得到 SQL“吐出”。

As I'm not completely sure about your question, if you'd like to have the table in a dump file, you could alternatively click the tab Export, where you can get the SQL as well, or download the dump file straight away.

由于我不完全确定您的问题,如果您想将表保存在转储文件中,您也可以单击选项卡Export,您也可以在其中获取 SQL,或立即下载转储文件。

回答by codingbiz

You can use the Export tab to select which table to export. In the diagram below,

您可以使用“导出”选项卡来选择要导出的表。在下图中,

  • the album table is specified
  • Structure is checked
  • Data is unchecked - to not generate data with the export
  • SQL radio button is checked
  • ...
  • Click on the Go button at the bottom to have the generated SQL
  • 指定专辑表
  • 检查结构
  • 数据未选中 - 导出时不生成数据
  • 选中 SQL 单选按钮
  • ...
  • 单击底部的 Go 按钮以生成生成的 SQL

enter image description here

在此处输入图片说明