简体   繁体   English

如何在不更改其中数据的情况下将表的模式从一个数据库导入到另一个数据库中的现有表?

[英]How can i import a schema of a table from one database to an existing table in another without altering the data in it?

I want to import/copy a schema of a table from e.g.我想从例如导入/复制表的架构"DB1 database" another table in "DB2 database" without doing anything to the data in it. “DB1 数据库”是“DB2 数据库”中的另一个表,而不对其中的数据做任何事情。 When I try to import the structure to the existing table it gives an error:当我尝试将结构导入现有表时,会出现错误:

" #1050 - Table 'access_logs' already exists " “#1050 - 表‘access_logs’已经存在”

In phpmyadmin Go to 'Opeartions' Tab and then go to 'Copy Table to' section In that select the database in which you want to copy the table and give a name to the table. In phpmyadmin Go to 'Opeartions' Tab and then go to 'Copy Table to' section In that select the database in which you want to copy the table and give a name to the table. You can choose options of Structure or Structure with data as per your requirements.您可以根据需要选择结构或结构与数据的选项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将数据从一个表导入到另一个表? - How to import data from one table to another? 如何在没有外壳(命令行)访问的情况下将表从一个数据库复制到同一服务器上的另一个数据库? - How can I copy a table from one database to another on the same server without shell (command line) access? 将数据从一个表转移到另一个表后,用于更改数据的存储过程? - Stored procedure for altering data after transferring it from one table to another? 如何使用Database:Seeding将数据从一个表导入另一个表? (laravel 5.3)? - How to import data from one table to another table using Database: Seeding? (laravel 5.3)? 如何将数据从一个数据库表插入到另一个数据库表? - How to insert data from one database table to another database table? 在第一个表中插入数据后,如何将数据从一个表插入到另一个表? - How can I insert data from one table to another table after insert a data in first table? 如何在不使用Apache DDLUtils的情况下使用JDBC将模式从一个数据库复制到另一个数据库? - How can I use JDBC to copy schema from one database to another without using Apache DDLUtils? 如何将数据从一个表转移到另一个表? - How can I transfer data from one table to another? 如何将图像数据从一张桌子移动到另一张桌子? - How can I move image data from one table to another? 如何在不更改数据的情况下更改表编码? - How to change table encoding without altering the data?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM