Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
YAQ on BIZ and DA tiers
Message
De
30/08/2009 13:32:43
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01419401
Message ID:
01421752
Vues:
47
I'm trying to figure out why one would need to do an INSERT and UPDATE in one line of code. The same table?

You might have two tables, Table A and Table B. You want to do a "selective syncrhonization"....if certain rows exist in B but not in A....you want to insert those rows from B to A.....and if certain rows exist in both, you might want to update certain columns from B to A. That's just one of several possibilities.

The MERGE in 2008 also has a DELETE section....so you "can" do an INSERT/UPDATE/DELETE in 1 line of code, though doing all 3 can result in a rather complex statement.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform