两次查找记录并从数据库中删除

Finding a records twice and removing from a database

我需要搜索一个数据库,其中 A 列显示是否添加或删除了记录。

如果搜索发现帐号中有一条记录显示为已添加,而另一条记录的帐号与已删除的记录相同,则它将删除已添加的记录。

这怎么可能?

提前致谢

那可能是:

Delete * From YourTable
Where Field6 = "Added" And AccountNummber In
    (Select AccountNumber From YourTable As T
    Where T.AccountNumber = YourTable.AccountNumber
    And T.Field6 = "Removed")