alter trigger Triger1
on Week_Schedule for insert
as
if @@ROWCOUNT=1
begin
if exists (
select *
from inserted as i, Week_Schedule as w
where i.Week_Number = w.Week_Number
)
begin
rollback tran
print
'Неделя с таким номером уже существует!'
end
end