Obtain data from one database and store it in another database ., Another database
1 insert into 'game _ 2015newterm_user '('uid', 'q1', 'xm', 'ct ', 'by', 'lj', 'xmlq ', 'ctlbq', 'bylbq', 'ljlbq', 'tdate') select uid, '0', '3', '0', '0', '0 ', '0', '0', '0', '0', '2017-03-16 'from game_2015school_user
Obtain the user ID from the game_2015school_userzhong table and use the constant select statement to query and construct the field data.
Insert into 'event _ 000000 '. 'game _ 2015newterm_user '('uid', 'q1', 'xm', 'ct ', 'by', 'lj', 'xmlq', 'ctlbq ', 'bylbq', 'ljlbq', 'tdate', 'uptime') VALUES (select uid from game_2015school_user where uid = 608035003), '0', '0 ', '0', '0', '0', '0', '0', '0', '0', '2017-03-16 ', CURRENT_TIMESTAMP );
Error. Insert select cannot use values, and the data obtained from select uid from... is not a unique value.