我在一张桌子上有250条记录,在提取成晃动后,计数是249条记录, 我错过了一条记录。
如何找出SQL SERVER中缺少的记录???
答案 0 :(得分:1)
select * from BiggerTable
where BiggerTable.id not in (select id from SmallerTable)
答案 1 :(得分:0)
select
*
from tableAll
left join TableLess
on tableAll.ID = TableLess.Id
where
TableLess.Id is null