1drop procedure create_person
2drop procedure set_person_name
3drop procedure delete_phone
4drop procedure add_phone
5drop procedure make_doc_link
6drop procedure del_doc_link
7drop procedure delete_person
8
9drop procedure create_org
10drop procedure set_org_name
11drop procedure delete_org
12
13drop procedure create_document
14drop procedure set_doc_title
15drop procedure set_doc_abstract
16drop procedure make_author_link
17drop procedure del_author_link
18drop procedure delete_document
19
20if exists (select * from sysobjects where id = object_id(N'authors_docs') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
21drop table authors_docs
22GO
23
24if exists (select * from sysobjects where id = object_id(N'documents') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
25drop table documents
26GO
27
28if exists (select * from sysobjects where id = object_id(N'institutes') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
29drop table institutes
30GO
31
32if exists (select * from sysobjects where id = object_id(N'persons') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
33drop table persons
34GO
35
36if exists (select * from sysobjects where id = object_id(N'phones') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
37drop table phones
38GO
39
40