我试图在条件发生时插入一个值,但它给了我错误 ambiguos 列名,代码是:
create trigger B
on ALUNOS
after update, insert
as
begin
update ALUNOS
set média_final = 9 from inserted where média_final < 9
end
try to follow this
update table set column = value where column = value
change value for the value that you want, you can add null or change null, don`t ever forget '' for string and lose it for numbers
create trigger B
on ALUNOS
after update, insert
as
begin
update ALUNOS
set média_final = 9
from inserted i where i.média_final < 9
end
模棱两可的列是 média_final,它在两个表中。指定它来自哪个表是您需要做的。