84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
有个问题,我有一张 A表和B表,A表是主表,用于存放主要信息,B表是附加表,存放次要信息,请问我怎么把B表的其中一个字段 带上字段中的值复制到主表中?
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.
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
A relates to B, join table query
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.
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
A relates to B, join table query