blog

Home / DeveloperSection / Blogs / Difference between GRANT and WITH GRANT in SQL Server 2008 R2

Difference between GRANT and WITH GRANT in SQL Server 2008 R2

Vijay Shukla 10028 08-Apr-2013

This blog provides an overview of the difference between GRANT and WITH GRANT using SQL Server 2008 R2.

GRANT and WITH GRANT:

The difference between GRANT and WITH GRANT options is very easy. For the GRANT, the username can’t GRANT the same permission to other users. On the other hand, in the case OF WITH GRANT, the UserId will be able to give the permission after receiving requests from other users.

Syntax for GRANT and WITH GRANT:
GRANT:

USE model;

GRANT VIEW ANY DATABASE TO UserId;

GO

WITH GRANT:

USE model;

GRANT VIEW ANY DATABASE TO UserId WITH GRANT OPTION;

GO


Updated 18-Sep-2014

Leave Comment

Comments

Liked By