Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update if exist and insert if it doesn't
Message
De
11/08/2001 19:04:45
 
 
À
11/08/2001 16:20:07
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00542663
Message ID:
00542694
Vues:
18
You can't do it in one instruction. Here's my perfered method:

if exists (select * from mytable where keyfield=keyvalue)
update ...
else
insert

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform