当前位置:网站首页>With the help of Navicat for MySQL software, the data of a database table in different or the same database link is copied to another database table

With the help of Navicat for MySQL software, the data of a database table in different or the same database link is copied to another database table

2022-07-05 07:27:00 12 procedural ape

Mode one : see mysql How to make Table data in a database Copied to the In another database table ( Two databases are not linked to the same database ) , There's no more encumbrance here

Mode two : With the help of Navicat for MySQL Software

1. Open the data to be copied , Retrieve data on demand , Then click export
 Insert picture description here
2. In the pop-up window below On demand Choose to click “ At present 3 Bar record ”
 Insert picture description here
3. Select the export format , Choose the format you want , I choose export here SQL Script files
 Insert picture description here
4. Click next
 Insert picture description here
5. Select export fields , Because I don't want to export id( The primary key increases automatically ) Field , therefore I put id Uncheck the . And then click next
 Insert picture description here
6. Click next
 Insert picture description here
7. Click Start
 Insert picture description here
8. according to export path , Get the corresponding sql

 Insert picture description here

INSERT INTO `warn_message`(`device_id`, `device_type`, `extend_json`, `install_place_id`, `pound_order_id`, `rational_deviation`, `real_deviation`, `overtime_duration`, `warn_type`, `deal_flag`, `deal_result`, `active_flag`, `created_user`, `created_time`, `updated_user`, `updated_time`, `warning_level`, `organization_id`, `start_time`, `end_time`, `description`, `resolver`, `third_warn_id`, `relation_user_id`) VALUES (1842, 8, NULL, 102, 0, 0.000, 0.000, 0, 0, 1, ' The system automatically cancels the alert ', 1, 0, '2021-02-03 11:23:00', 0, '2021-02-03 14:40:00', 3, 1047, '2021-02-03 11:23:00', '2021-02-03 14:40:00', NULL, NULL, '6534', NULL);
INSERT INTO `warn_message`(`device_id`, `device_type`, `extend_json`, `install_place_id`, `pound_order_id`, `rational_deviation`, `real_deviation`, `overtime_duration`, `warn_type`, `deal_flag`, `deal_result`, `active_flag`, `created_user`, `created_time`, `updated_user`, `updated_time`, `warning_level`, `organization_id`, `start_time`, `end_time`, `description`, `resolver`, `third_warn_id`, `relation_user_id`) VALUES (1842, 8, NULL, 102, 0, 0.000, 0.000, 0, 0, 1, ' The system automatically cancels the alert ', 1, 0, '2021-02-03 11:43:00', 0, '2021-02-03 14:40:00', 3, 1047, '2021-02-03 11:43:00', '2021-02-03 14:40:00', NULL, NULL, '6534', NULL);
INSERT INTO `warn_message`(`device_id`, `device_type`, `extend_json`, `install_place_id`, `pound_order_id`, `rational_deviation`, `real_deviation`, `overtime_duration`, `warn_type`, `deal_flag`, `deal_result`, `active_flag`, `created_user`, `created_time`, `updated_user`, `updated_time`, `warning_level`, `organization_id`, `start_time`, `end_time`, `description`, `resolver`, `third_warn_id`, `relation_user_id`) VALUES (1842, 8, NULL, 102, 0, 0.000, 0.000, 0, 0, 0, ' The system automatically cancels the alert ', 1, 0, '2021-02-03 12:11:00', 0, '2021-02-03 13:56:00', 3, 1047, '2021-02-03 12:11:00', '2021-02-03 13:56:00', NULL, NULL, '6534', NULL);

9. Take what you get from above sql sentence , Execute in the target database
 Insert picture description here
Execution results :
 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[12 procedural ape]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050721460942.html