1、创建table并设置主键(不含主键名:此时主键名会自动生成)
GO CREATE TABLE [dbo].[Test]( [ID] [nvarchar](36) primary key, [TestContent] [nvarchar](50) NULL, [Creater] [nvarchar](36) NULL, [CreateTime] [datetime] NULL, ) ON [PRIMARY] GO
2、创建table并设置主键(含自定义主键名)
GO CREATE TABLE [dbo].[Test]( [ID] [nvarchar](36) not null, [TestContent] [nvarchar](50) NULL, [Creater] [nvarchar](36) NULL, [CreateTime] [datetime] NULL, CONSTRAINT pk_Test_ID PRIMARY KEY ([ID]) ) ON [PRIMARY] GO