通过现有数据快速插入构造新数据
1 INSERT INTO `merge`.`ods_binlog_traffic_vehicle_tracks` ( 2 `id`, 3 `vehicle_no`, 4 . 5 . 6 . 7 `gps_datetime`, 8 . 9 . 10 . 11 `update_time`, 12 . 13 . 14 . 15 ) SELECT 16 CONCAT( id, 'C' ) AS id, 17 CONCAT( vehicle_no, '-1' ) AS `vehicle_no`, 18 . 19 . 20 . 21 NOW() AS `gps_datetime`, 22 . 23 . 24 . 25 NOW() AS `update_time`, 26 . 27 . 28 . 29 FROM 30 ods_binlog_traffic_vehicle_tracks 31 WHERE 32 is_online = 2 33 AND current_xzqh_id >= 120000 34 AND current_xzqh_id <= 129999
标签:ods,no,SQL,查询,插入,vehicle,datetime,id From: https://www.cnblogs.com/supperlhg/p/17789009.html