Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More than one field.
Message
De
08/01/2004 17:42:38
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00865244
Message ID:
00865258
Vues:
16
>Is there a way to use more than one field when I determine if a record is not in a specific subquerey? For example:
>
> select * from table1 where field1 not in(select * from table2)
>
>I would like check all of the fields from table1 and determine if that EXACT record is contained in table2.
>
>Thanks in advance
>Kelly

use a NOT EXISTS, e.g.
select * from table1 t1
  where not exists
         (select * from table2 t2
          where t2.field1 = t1.field1
            and t2.field2 = t1.field2
            and ...)
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform