时间:2021-07-01 10:21:17 帮助过:14人阅读
Order(订单表)-- Id(自增主键)OrderName(订单名称)Content(订单内容)CustomerId(顾客id)
CREATE TABLE [dbo].[Order]( [Id] [int] IDENTITY(1,1) NOT NULL, [OrderName] [nvarchar](50) NULL, [Content] [nvarchar](256) NULL, [CustomerId] [int] NOT NULL, CONSTRAINT [PK_Order] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[Order] WITH CHECK ADD CONSTRAINT [FK_CustomerOrder] FOREIGN KEY([CustomerId]) REFERENCES [dbo].[Customer] ([Id]) GO ALTER TABLE [dbo].[Order] CHECK CONSTRAINT [FK_CustomerOrder]订单表建库脚本
as
sa
as
as
s
s
SQL、LINQ、Lambda 三种用法
标签:logs varchar 单表 image exp foreign har 数据表 put