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


Database Database 
Ratings:
0 Comment(s)
 4902  View(s)
Rate this:

Difference between GRANT and WITH GRANT in SQL Server 2008 R2

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


Don't want to miss updates? Please click the below button!

Follow MindStick