复杂的修改语句,报错:
不能在FROM子句中为更新指定目标表 (You can’t specify target table ‘xxx’ for update in FROM clause )…
你需要用到临时表,替换,下面一个小例子:
UPDATE tbinvoicedetails invoa
SET invoa.flag = ‘0’
WHERE
invoa.invoicecode IN (
SELECT
invp.invoicecode
FROM
tbinvoicedetails invp
WHERE
invp.prem < 0
)
希望所写的对你们有用。