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 a.packageno='xxx'?