sqlserver笔记----创建用户赋予权限

时间:2021-03-14 08:47:22

1、创建用户:

create login username with password='密码' , default_database=数据库;
create user username for login username with default_schema=dbo;

2、增删改查授权

grant select,insert,UPDATE,DELETE onto username

3、存储过程授权

GRANT EXECUTE ON 存储过程名 TO username

4、禁止对表授权

DENY UPDATE ONTO username CASCADE;

5、回收权限

REVOKE DELETE ONFROM username