if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_帐单明细_入住单]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[帐单明细] DROP CONSTRAINT FK_帐单明细_入住单
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_入住单_客房信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[入住单] DROP CONSTRAINT FK_入住单_客房信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_客房信息_客房类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[客房信息] DROP CONSTRAINT FK_客房信息_客房类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_入住单_客房类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[入住单] DROP CONSTRAINT FK_入住单_客房类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_入住单历史_客房类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[入住单历史] DROP CONSTRAINT FK_入住单历史_客房类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_预定单_客房类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[预定单] DROP CONSTRAINT FK_预定单_客房类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_预定单历史_客房类型]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[预定单历史] DROP CONSTRAINT FK_预定单历史_客房类型
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_客房信息_楼层信息]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[客房信息] DROP CONSTRAINT FK_客房信息_楼层信息
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v_客房信息]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[v_客房信息]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AROrder]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AROrder]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ARRoomPrice]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ARRoomPrice]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ARType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ARType]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ChangeRoom]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ChangeRoom]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DayBill]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DayBill]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DayBillDesc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DayBillDesc]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FeeCode]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[FeeCode]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FeeType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[FeeType]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GARFee]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GARFee]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GOrder]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GOrder]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GResRoom]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GResRoom]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GType]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetGlean]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GetGlean]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Glean]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Glean]
GO
if exists (select * from dbo.sysobjects where id = objec�