Курсовая работа: Информационная система военного округа

rollback transaction

return

end

end

/* Restrict child "Tehnika" when parent "Podrazdelenie" updated */

if update([Nomer_podrazdelenia])

begin

if exists (select 1 from [Tehnika] t, deleted d

where t.[Nomer_podrazdelenia] = d.[Nomer_podrazdelenia])

begin

raiserror 50001 'Children still exist in table ''Tehnika''. Cannot update parent table ''Podrazdelenie''.'

rollback transaction

return

end

end

/* Restrict child "Voorugenie" when parent "Podrazdelenie" updated */

if update([Nomer_podrazdelenia])

begin

if exists (select 1 from [Voorugenie] t, deleted d

where t.[Nomer_podrazdelenia] = d.[Nomer_podrazdelenia])

begin

raiserror 50001 'Children still exist in table ''Voorugenie''. Cannot update parent table ''Podrazdelenie''.'

rollback transaction

return

end

end

/* Restrict child "Soorugenia" when parent "Podrazdelenie" updated */

if update([Nomer_podrazdelenia])

begin

К-во Просмотров: 1250
Бесплатно скачать Курсовая работа: Информационная система военного округа