代码如下:CREATE TABLE Sale( [Id] [int] identity(1,1) NOT NULL, –自动增长 [Name] [varchar](16) NOT NULL, [SaleTime] [datetime] NOT NULL, constraint [PK_Sale] primary key clustered –创建主键 ( [Id] ASC ) ) –插入一些记录 insert Sale ([Name],[SaleTime]) values (‘张三’,’2009-