Icon GRANT PRIVILEGES

Grants privileges on a given object to a user or role.

Syntax
GRANT <PrivilegeName> [,<PrivilegeName>]
ON <ObjectName>
TO <Authorization> [,<Authorization>]

<PrivilegeName> =

ALL PRIVILEGES|
SELECT|
INSERT|
UPDATE|
DELETE|
CREATE|
ALTER|
DROP|
MAINTAIN|
BACKUP|
RESTORE|
EXECUTE

<ObjectName> =

DATABASE <DatabaseName>|
STORE <StoreName>|
TABLE <TableName>|
VIEW <ViewName>|
PROCEDURE <ProcedureName>|
FUNCTION <FunctionName>

<Authorization> = <UserName>|<RoleName>

Usage
Use this statement to grant privileges to a user or role.

Examples
-- The following statement grants SELECT privileges
-- on the EmployeesList view to the system-defined
-- Public role which, by default, includes all users.

GRANT SELECT ON VIEW "EmployeesList"
TO "Public"

Required Privileges
The current user must be granted the system-defined Administrators role in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
WITH HIERARCHY OPTIONElevateDB does not support the WITH HIERARCHY OPTION clause.
WITH GRANT OPTIONElevateDB does not support the WITH GRANT OPTION clause. Only administrators can grant privileges and roles in ElevateDB.
GRANTED BYElevateDB does not support the GRANTED BY clause. The grantor in ElevateDB is always the administrator executing the GRANT statement.
PrivilegesElevateDB does not support the REFERENCES, USAGE, TRIGGER, and UNDER privileges, and adds the CREATE, ALTER, DROP, MAINTAIN, BACKUP, and RESTORE privileges as extensions.
Image