IF NOT EXISTS (SELECT * FROM sysobjects WHERE Name = OBJECT_ID(N'[dbo].[Role]') AND type in (N'U'))BEGINCREATE TABLE [dbo].[Role]([ID] [int] IDENTITY(1,1) NOT NULL,[RoleName] int NULL,CONSTRAINT [PK_Role] PRIMARY KEY CLUSTERED ([ID] ASC)) ON [PRIMARY]
2 回答
慕婉清6462132
TA贡献1804条经验 获得超2个赞
IF NOT EXISTS (SELECT * FROM sysobjects WHERE Name = 'Role' AND type = 'U')
BEGIN
CREATE TABLE [dbo].[Role](
[ID] [int] IDENTITY(1,1) NOT NULL,
[RoleName] int NULL,
CONSTRAINT [PK_Role] PRIMARY KEY CLUSTERED
(
[ID] ASC
)
) ON [PRIMARY]
慕慕森
TA贡献1856条经验 获得超17个赞
参数类型错误,将 public bool Update(string id 换成 public bool Update(int id 即可。当然,函数调用也要变更,这是个int类型而不是字符串类型。
- 2 回答
- 0 关注
- 212 浏览
添加回答
举报
0/150
提交
取消