بتاريخ: 3 مايو 200817 سنة comment_127946 2 - احذر من الوقوع في فخ not in حيث ان هذا العبارة تعطي القيمة false اذا كانت اي قيمة في ال subquery هي null SQL> select count(*) 2 from outgoing_bucket 3 where notification_id not in 4 (select notification_id 5 from incoming_bucket); COUNT(*) -------- 0 SQL> select count(*) 2 from outgoing_bucket 3 where notification_id is not null 4 and notification_id not in 5 (select notification_id 6 from incoming_bucket 7 where notification_id is not null); COUNT(*) -------- 19056 تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.