How to find rows in one table that have no corresponding row in another table

后端 未结 6 739
甜味超标
甜味超标 2020-11-29 01:50

I have a 1:1 relationship between two tables. I want to find all the rows in table A that don\'t have a corresponding row in table B. I use this query:

SELEC         


        
6条回答
  •  独厮守ぢ
    2020-11-29 02:21

    I can't tell you which of these methods will be best on H2 (or even if all of them will work), but I did write an article detailing all of the (good) methods available in TSQL. You can give them a shot and see if any of them works for you:

    http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=QueryBasedUponAbsenceOfData&referringTitle=Home

提交回复
热议问题