-
Notifications
You must be signed in to change notification settings - Fork 19
/
clear.sql
28 lines (25 loc) · 944 Bytes
/
clear.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DROP TABLE IF EXISTS books CASCADE;
DROP TABLE IF EXISTS orders CASCADE;
DROP TABLE IF EXISTS genres CASCADE;
DROP TABLE IF EXISTS authors CASCADE;
DROP TABLE IF EXISTS reviews CASCADE;
DROP TABLE IF EXISTS shippers CASCADE;
DROP TABLE IF EXISTS discounts CASCADE;
DROP TABLE IF EXISTS customers CASCADE;
DROP TABLE IF EXISTS employees CASCADE;
DROP TABLE IF EXISTS publishers CASCADE;
DROP TABLE IF EXISTS books_genres CASCADE;
DROP TABLE IF EXISTS orders_details CASCADE;
DROP TABLE IF EXISTS books_discounts CASCADE;
DROP TABLE IF EXISTS customers_discounts CASCADE;
DROP VIEW IF EXISTS book_adder;
DROP VIEW IF EXISTS books_rank;
DROP FUNCTION IF EXISTS is_phonenumber();
DROP FUNCTION IF EXISTS give_discount();
drop FUNCTION if EXISTS is_available();
DROP FUNCTION IF EXISTS has_bought();
drop FUNCTION if EXISTS set_rank();
DROP FUNCTION IF EXISTS is_isbn();
drop FUNCTION if EXISTS is_nip();
DROP RULE IF EXISTS adder
ON book_adder;