原题重提
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[airlineInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[airlineInfo]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[customerInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[customerInfo]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[customerType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[customerType]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[planeInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[planeInfo]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[serviceInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[serviceInfo]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ticketInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ticketInfo]
GO
CREATE TABLE [dbo].[airlineInfo] (
[airlineNO] [char] (14) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[departCity] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[arrivalCity] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[departDate] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[departTime] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[arrivalTime] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[planeNO] [char] (18) COLLATE Chinese_PRC_CI_AS NULL ,
[commonPrice] [numeric](18, 2) NULL ,
[commercialPrice] [numeric](18, 2) NULL ,
[firstPrice] [numeric](18, 2) NULL ,
[airlineMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[customerInfo] (
[customerNO] [char] (14) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[customerName] [char] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[customerSex] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[customerID] [char] (18) COLLATE Chinese_PRC_CI_AS NULL ,
[customerTele] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[customerType] [char] (14) COLLATE Chinese_PRC_CI_AS NULL ,
[customerMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[customerType] (
[ctypeNO] [char] (14) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[ctypeName] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[discount] [numeric](2, 0) NULL ,
[ctypeMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[planeInfo] (
[planeNO] [char] (18) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[planeType] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[buyDate] [datetime] NULL ,
[serveDate] [datetime] NULL ,
[isCommon] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[isCommercial] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[isFirst] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[planeMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[serviceInfo] (
[serviceNO] [char] (4) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[serviceName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[noPresent] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[noNewsPaper] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[noDrink] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[noFood] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[noMovie] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[canChange] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[canCancel] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[canDiscount] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
[serviceMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[ticketInfo] (
[ticketNO] [char] (14) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[customerNO] [char] (14) COLLATE Chinese_PRC_CI_AS NULL ,
[customerName] [char] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[customerType] [char] (14) COLLATE Chinese_PRC_CI_AS NULL ,
[discount] [numeric](18, 0) NULL ,
[airlineNO] [char] (14) COLLATE Chinese_PRC_CI_AS NULL ,
[departCity] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[arrivalCity] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[ticketDate] [datetime] NULL ,
[serviceType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[ticketPrice] [numeric](18, 2) NULL ,
[ticketSum] [numeric](18, 2) NULL ,
[ticketMemo] [text] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO