以下在mysql中不起作用,任何替代方式:
DELETE FROM _ResourceUsageData
WHERE RowNo >
(SELECT MIN(RowNo) FROM
_ResourceUsageData
WHERE
ResourceInstanceStatus = 'Deleted');
答案 0 :(得分:2)
在Mysql中,您无法从要删除的表中进行选择。但你可以用另一个子查询来欺骗它。
DELETE FROM _ResourceUsageData
WHERE RowNo >
(
select * from
(
SELECT MIN(RowNo)
FROM _ResourceUsageData
WHERE ResourceInstanceStatus = 'Deleted'
) x
)