update a表 set a_1字段='值' where b_1字段 in(select b_1字段 from b表 where b_1字段 like '%关键字%')
update a表 set a_1字段='值' where b_1字段 in(select b_1字段 from b表 where b_1字段 like '%关键字%') 不对,提示错误 Unknown column 'b_1字段' in 'IN/ALL/ANY subquery' SQL执行失败,请检查SQL语句是否正确[?]
update a表 set a_1字段='值' where b_1字段 in(select id from b表 where b_1字段 like '%关键字%')
update a表 set a_1字段='值' where id in(select id from b表 where b_1字段 like '%关键字%') where id才正确 不过还是谢谢大神给我启发
update a表 set a_1字段='值' where b_1字段 我就一直想问 sql语句的主干部分只有一张a表 为什么 子语句where 直接出现b_1字段 作为判断条件~
不对,提示错误
Unknown column 'b_1字段' in 'IN/ALL/ANY subquery'
SQL执行失败,请检查SQL语句是否正确[?]
where id才正确
不过还是谢谢大神给我启发