Count all records that does not exist to other table - SQL Query

后端 未结 3 650
醉酒成梦
醉酒成梦 2021-01-19 15:30

I have two(2) tables and I\'m trying to count all records from Table1 and Table1_delta were pagename from Table1_delta is not yet listed into Table1. Incase pagename from Ta

3条回答
  •  滥情空心
    2021-01-19 15:47

    Try using joins

    Select count(Table1_delta.pagename) from Table1_delta 
    INNER JOIN Table1 ON 
        Table1_delta.pagename != Table1 .pagename 
        AND Table1.status != 1
    

提交回复
热议问题