Azure SQL Database
An Azure relational database service.
6,338 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,team.
If I want to update columns, when my number of SP_SW is less than 30, add SP_SW as 50, how can I go about implementing it, please help me, it's urgent for me....
Thanks.
My code:CREATE TRIGGER trigger
ON SP_SW
AFTER INSERT
AS
update SP_SW
set SP_SW=id
from inserted
where inserted.id=id
Hi @SPWGUT
How about this:
update SP_SW
set SP_SW=case when SP_SW <30 then 50 else id end
from inserted
where inserted.id=id
Best regards,
LiHong
Can it be written like this where inserted.id=id and SP_SW<30,Help me...