日期:2014-05-16  浏览次数:20712 次

sql语句不执行
delete from (select * from sys_barcode_1d_y union all select * from sys_barcode_1d_y_bak union all select * from FG_hi_cust_In where hi_no like 'ESC%')a where packageno='xxx'

sql语句不执行,请问是什么原因?
------解决方案--------------------
语法问题。。。
------解决方案--------------------
把三个表union起来一起删数据库会报错。
2楼的方法使用CTE也还是说“视图 'cte' 不可更新,因为其定义中包含 UNION 运算符。”
------解决方案--------------------
三张表分开删除,分开写成3条语句。