mysql想要把另一張表中的某個字段更新到一張表中的字段
update tableA? a
set a.relationId=
CONCAT(a.relationId,(select CONCAT(',',GROUP_CONCAT(Id)) from tableB where Id>10 and name='B數(shù)據(jù)'))
where a.name='A數(shù)據(jù)';
update tableA? a
set a.relationId=
CONCAT(a.relationId,(select CONCAT(',',GROUP_CONCAT(Id)) from tableB where Id>10 and name='B數(shù)據(jù)'))
where a.name='A數(shù)據(jù)';