b0nn
public sql v1 · immutablecreate trigger chk_team on teamsfor insert, update asdeclare @chkCountry as char(2)select @chkCountry = (select country from INSERTED)-- if @@ROWCOUNT =0 RETURNIf @chkCountry NOT IN (select distinct country from teams)BEGIN raiserror('Impossible country entered', 16, 1) ROLLBACK TRANSACTIONEND