MySQL inserts the data queried in Table a into Table B. mysql
MySQL inserts the data queried in Table a into Table B.
If table B exists
insert into b select * from a;
If table B does not exist
create table b as select * from a;
Extension:
Insert a write segment value in Table B to Table.
insert into a (userID,userName) select b.userID,b.userName from tr_ajax_chat_messages;
Save the userID values of table a and table B to Table.
update a set a.userName=(select b.userName from b where a.userID = b.userID);
Insert the query results of one table into another table (oracle, mysql, SQL, and GP)
If the table exists:
Insert into tab1 select * from tab2;
If the table does not exist:
Create table tab1 as select * from tab2;
How does mysql move table 1 of database a to database B?
For php, use phpmyadmin to export table 1 to the. SQL file and then import it to database B.
For jsp, you can use mysql-front, a visual mysql database operating system. You can export table 1 and import it to database B.