汽车系统sql表1
时间:2008-07-04 来源:ziyouwawa
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_CarInsurance_CarInformation]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[CarInsurance] DROP CONSTRAINT FK_CarInsurance_CarInformation
GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CarInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CarInformation]
GO CREATE TABLE [dbo].[CarInformation] (
[RegistMark] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[HostName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[HostID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Telephone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[DriverLisence] [datetime] NOT NULL ,
[CarType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[purchaseDate] [datetime] NOT NULL ,
[CarPrice] [money] NOT NULL ,
[CarNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EngineNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CarInsurance] DROP CONSTRAINT FK_CarInsurance_CarInformation
GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CarInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CarInformation]
GO CREATE TABLE [dbo].[CarInformation] (
[RegistMark] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[HostName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[HostID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Telephone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[DriverLisence] [datetime] NOT NULL ,
[CarType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[purchaseDate] [datetime] NOT NULL ,
[CarPrice] [money] NOT NULL ,
[CarNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EngineNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
相关阅读 更多 +