This repository has been archived on 2020-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
ibz/db/1_sem/Berater/Berater/remove_tables.sql

29 lines
587 B
Transact-SQL

-- Creates the tables for the Berater DB
--
-- Author: Andreas Zweili
-- Erstellt: 2016-12-16
-- DB-Server SQL Server 2016
use Berater;
alter table berater
drop constraint if exists fk_berater_aufgabe;
go
alter table arbeit
drop constraint if exists fk_arbeit_berater;
go
alter table arbeit
drop constraint if exists fk_arbeit_kunde;
go
if exists (select * from sysobjects where name='arbeit')
drop table arbeit;
if exists (select * from sysobjects where name='kunde')
drop table kunde;
if exists (select * from sysobjects where name='aufgabe')
drop table aufgabe;