Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickest way to see if a record exists
Message
 
 
À
17/09/2008 05:53:43
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:
01348186
Vues:
29
>hi
>what is the best/ quickest way to check if a record exists in a table? thats all I want to know, ie "select from mytable where myid =lcid " and myId is not a primary key
>thanks
>stuart

IF EXISTS (select 1 from myTable where myID = @PassedID)
-- Record Exists
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform