Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickest way to see if a record exists
Message
 
À
17/09/2008 06:39:44
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Divers
Thread ID:
01348134
Message ID:
01348149
Vues:
29
>hi
>so what am I doing wrong here
>
>
> SELECT pk  FROM myTable  where exists( SELECT *  FROM myTable  where id ="12345" )
>
>this returns every record in the table
>TIA
>Stuart

You just have record(s) where id is equal to "12345"
What you want as a result from that query?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform