1 2 3 4 5 6 7 8 9 10 11 12 13 14
| -- 创建角色 CREATE ROLE [erp_role] GO -- 创建用户 CREATE LOGIN [erp_user] WITH PASSWORD = '123456' GO CREATE USER [erp_user] FOR LOGIN [erp_user] GO -- 将用户添加到角色 EXEC sp_addrolemember 'erp_role', 'erp_user' GO -- 授予角色表权限 GRANT SELECT, INSERT, UPDATE, DELETE ON [user] TO [erp_role] GO
|