db_AI-4/sql/sql/setup_04_remove_database.sql

66 lines
1.6 KiB
MySQL
Raw Normal View History

2017-06-26 21:17:54 +02:00
-- Removes the tables for the market DB
2017-06-05 13:11:26 +02:00
--
-- Author: Andreas Zweili
-- Erstellt: 2017-05-27
-- DB-Server SQL Server 2016
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='commercials')
2017-06-24 20:08:30 +02:00
DROP TABLE commercials;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='member_status')
2017-06-24 20:08:30 +02:00
DROP TABLE member_status;
2017-06-24 15:32:42 +02:00
use marketdb;
2017-06-26 21:17:54 +02:00
if exists (select * from sysobjects where name='salutations')
DROP TABLE salutations;
2017-06-24 15:32:42 +02:00
use marketdb;
2017-06-26 21:17:54 +02:00
if exists (select * from sysobjects where name='subscriptions')
DROP TABLE subscriptions;
2017-06-24 15:32:42 +02:00
use marketdb;
2017-06-26 21:17:54 +02:00
if exists (select * from sysobjects where name='subscption_orders')
DROP TABLE subscption_orders;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='members')
2017-06-24 20:08:30 +02:00
DROP TABLE members;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='persons')
2017-06-24 20:08:30 +02:00
DROP TABLE persons;
2017-06-24 15:32:42 +02:00
use marketdb;
2017-06-26 21:17:54 +02:00
if exists (select * from sysobjects where name='trial_periods')
DROP TABLE trial_periods;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='quality_checks')
2017-06-24 20:08:30 +02:00
DROP TABLE quality_checks;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='cities')
2017-06-24 20:08:30 +02:00
DROP TABLE cities;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='countries')
2017-06-24 20:08:30 +02:00
DROP TABLE countries;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='rents')
2017-06-24 20:08:30 +02:00
DROP TABLE rents;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='locations')
2017-06-24 20:08:30 +02:00
DROP TABLE locations;
2017-06-24 15:32:42 +02:00
use marketdb;
if exists (select * from sysobjects where name='rent_prices')
2017-06-24 20:08:30 +02:00
DROP TABLE rent_prices;
2017-06-05 13:11:26 +02:00
use master;
if exists (select * from sys.databases where name='marketdb')
drop DATABASE marketdb;