I have a question. I have a table A and a table B. Table A is the main table, used to store the main information, and table B is an additional table, used to store secondary information. How can I bring one of the fields of table B into Copy the value in the above field to the main table?
迷茫2017-05-16 13:02:36
UPDATE A INNER JOIN B ON A.id = B.id SET A.a = B.b;
A.id = B.id: the associated fields of the two tables;
A.a: the field that receives the data from table B;
B.b: the field that will be copied to table A.
过去多啦不再A梦2017-05-16 13:02:36
First you need to add this field to table A, and then update the joint table
Or you can create a view for them if you need a simple query