Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Understanding This Syntax
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01410281
Message ID:
01410306
Vues:
21
>>Back to my example. I'm not entirely sure what this trigger is doing.
>>
>>
>>CREATE TRIGGER InsertPublication 
>>ON Publications 
>>AFTER INSERT 
>>AS 
>>BEGIN 
>>	UPDATE Books 
>>	SET NumPublications = NumPublications + 1
>>               FROM Books, inserted 
>>	       WHERE Books.ISBN = inserted.ISBN 
>>END
>>
>>
>
>For each inserted book information into the Publications table this trigger also updates Books table and increments NumPublications field.
>
>In another words, say, you inserted two records into Publications table with the same ISBN, then Books table would have NumPublications field incremented by 2 for this Book.

Thanks All!
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform