标签:style color ar 数据 sp 2014 c r bs
遇到一个情况,想通过表1的id找到表2,删除表2中barcode关联的库存数据,然后一直不能失败,如下:
delete from 库存表 where BARCODE in
(
select BARCODE from 表1 where fmoveid=
(select id from 表2 where PCID=‘SMX2014082604494930‘)
);
解决方式,加别名
delete from 库存表 where BARCODE in
(
select aa.BARCODE from(
select BARCODE from 表1 where fmoveid=
(select id from 表2 where PCID=‘SMX2014082604494930‘)
) as aa
);
标签:style color ar 数据 sp 2014 c r bs
原文地址:http://www.cnblogs.com/aixin0428/p/4011185.html