网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > MySQL
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 112.87.30.213
Old 2016-08-17, 12:20 AM
Taylor Lake Village Taylor Lake Village is offline
初级会员
 
Join Date: 2006-01-02
Posts: 1
Taylor Lake Village 现在声名狼藉
Default mysql把一个数据库中的数据复制到另一个数据库中的表 2个表结构相同

Copy a table from 2 different databases

1。表结构相同的表,且在同一数据库(如,table1,table2)

Sql :insert into table1 select * from table2 (完全复制)
如: insert into `dgd`.`admin` select * from `au`.`admin`



insert into table1 select distinct * from table2(不复制重复纪录)

insert into table1 select top 5 * from table2 (前五条纪录)

2。 不在同一数据库中(如,db1 table1,db2 table2)

sql: insert into db1..table1 select * from db2..table2 (完全复制)

insert into db1..table1 select distinct * from db2table2(不复制重复纪录)

insert into tdb1..able1 select top 5 * from db2table2 (前五条纪录)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql把一个数据库中的数据复制到另一个数据库中的表 2个表结构相同 Haigler MySQL 0 2016-07-18 12:36 AM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 09:11 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.