i've question about insert query mysql
i want to insert from a table data from another table. here's my table :
table 1
id , name
23 , test_name
and
table 2
id, code_name , name
23 , 23 , test_name
i want insert table 2 with kode_name same value with id from table 1 i don't know how to insert with code_name same value id from table 1
how to do this?
INSERT INTO Table2(ID, Code_Name, Name) SELECT ID, ID, Name FROM Table1
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments