Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update and Set in one statement?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01611535
Message ID:
01611556
Vues:
32
>>>>Hi,
>>>>I would like to create a SQL Server command that would set a column to a value and at the same time set the value before the change.
>>>>
>
>>>Look into OUTPUT clause for UPDATE command in order to set variables of before and after values (Deleted and Inserted tables).
>>
>>Did you see what Hugo suggested? And thank you for your suggestions.
>
>I saw it, but it's not a good suggestion. OUTPUT clause is the way to go.

Why putting both the UPDATE and SET in the same expression is not a good suggestion?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform