Microsoft SQL Server

Privileges or Permissions

Simple rules

Granting permission to create tables

USE AdventureWorks;  
GRANT CREATE TABLE TO MelanieK;  
GO 

Granting SHOWPLAN permission to an application role

USE AdventureWorks2012;  
GRANT SHOWPLAN TO AuditMonitor;  
GO  

Granting CREATE VIEW with GRANT OPTION

USE AdventureWorks2012;  
GRANT CREATE VIEW TO CarmineEs WITH GRANT OPTION;  
GO 

Granting all rights to a user on a specific database

use YourDatabase
go
exec sp_addrolemember 'db_owner', 'UserName'
go

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow