How to delete in MS Access when using JOIN's?

后端 未结 3 1478
渐次进展
渐次进展 2020-12-01 05:24

I am attempting to use the DELETE clause in MS Access and have an issue when also using the JOIN clause. I have notice this can be accomplished by

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 06:12

    DELETE a.*
    FROM tblA AS A
    WHERE EXISTS (SELECT 1 FROM tblB AS B WHERE a.id=b.id)
    

    try this

    DELETE tblA 
    FROM tblB  
    WHERE EXISTS (SELECT * FROM tblA AS A,tblB AS B WHERE A.id=B.id)
    

提交回复
热议问题