if exists (select * from sysobjects where id = OBJECT_ID('[Admin]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Admin]


if exists (select * from sysobjects where id = OBJECT_ID('[Admin_Log]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Admin_Log]


if exists (select * from sysobjects where id = OBJECT_ID('[AllPath]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [AllPath]


if exists (select * from sysobjects where id = OBJECT_ID('[allpathqs]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [allpathqs]


if exists (select * from sysobjects where id = OBJECT_ID('[Company]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Company]


if exists (select * from sysobjects where id = OBJECT_ID('[Config]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Config]


if exists (select * from sysobjects where id = OBJECT_ID('[Dept]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Dept]


if exists (select * from sysobjects where id = OBJECT_ID('[Friend]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Friend]


if exists (select * from sysobjects where id = OBJECT_ID('[FriendTeam]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [FriendTeam]


if exists (select * from sysobjects where id = OBJECT_ID('[GG]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [GG]


if exists (select * from sysobjects where id = OBJECT_ID('[kind]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [kind]


if exists (select * from sysobjects where id = OBJECT_ID('[Menu]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Menu]


if exists (select * from sysobjects where id = OBJECT_ID('[Message]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Message]


if exists (select * from sysobjects where id = OBJECT_ID('[Reg]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Reg]


if exists (select * from sysobjects where id = OBJECT_ID('[Relevance]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Relevance]


if exists (select * from sysobjects where id = OBJECT_ID('[Role]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Role]


if exists (select * from sysobjects where id = OBJECT_ID('[Safe]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Safe]


if exists (select * from sysobjects where id = OBJECT_ID('[Style]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Style]


if exists (select * from sysobjects where id = OBJECT_ID('[Team]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Team]


if exists (select * from sysobjects where id = OBJECT_ID('[template]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [template]


if exists (select * from sysobjects where id = OBJECT_ID('[topdir]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [topdir]


if exists (select * from sysobjects where id = OBJECT_ID('[UPTasks]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [UPTasks]


if exists (select * from sysobjects where id = OBJECT_ID('[Workgroup]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [Workgroup]


if exists (select * from sysobjects where id = OBJECT_ID('[zy]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [zy]


if exists (select * from sysobjects where id = OBJECT_ID('[zymenu]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
DROP TABLE [zymenu]
