Home  >  Article  >  Database  >  复制数据库

复制数据库

WBOY
WBOYOriginal
2016-06-07 15:29:241387browse

truncate table ASSET_TRANSFER_INTERFACE copy to mmscde/paic1234@hdfmsprd insert ASSET_TRANSFER_INTERFACE using select * From ASSET_TRANSFER_INTERFACE copy to mmscde/paic1234@hdfmsprd insert mms2_actions using select * From mms2_actions cop

truncate table ASSET_TRANSFER_INTERFACE

copy to mmscde/paic1234@hdfmsprd insert ASSET_TRANSFER_INTERFACE using select * From ASSET_TRANSFER_INTERFACE

copy to mmscde/paic1234@hdfmsprd insert mms2_actions using select * From mms2_actions

copy to mmscde/paic1234@hdfmsprd insert mms2_actions_eoa using select * From mms2_actions_eoa

copy to mmsdata/paic1234@hdfmsprd create mms_material_info_bak using select m.* From mms_material_info m, mms2_actions a where a.material_id = m.material_id

insert into mms_material_info

select b.*, '', '', ''

from mms_material_info_bak b

where not exists (select 1 from mms_material_info m where m.material_id = b.material_id)

COPY {FROM database | TO database | FROM database TO database} {APPEND|CREATE|INSERT|REPLACE} destination_table [(column, column, column, ...)]

USING query

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn