SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual691117-005
2-243
Examples of GRANT
Privileges on Views
Granting a privilege on a view does not grant that privilege to the corresponding
column of the underlying table.
Privileges on Stored Procedures
You can also manage security on a stored procedure by using the GRANT EXECUTE
and REVOKE EXECUTE statements. See GRANT EXECUTE Statement on
page 2-245 and REVOKE EXECUTE Statement on page 2-322.
Examples of GRANT
This example grants SELECT and DELETE privileges on a table, in addition to the
privilege of granting SELECT and DELETE privileges to others:
GRANT SELECT, DELETE ON TABLE sales.odetail
TO "sql.user1", "sql.user2" WITH GRANT OPTION;
This example grants UPDATE privileges on the named columns to PUBLIC:
GRANT UPDATE (start_date, ship_timestamp)
ON TABLE persnl.project TO PUBLIC;
In this example, the super ID grants SELECT and DELETE privileges on a table on
behalf of sql.user1:
GRANT SELECT, DELETE ON TABLE sales.odetail
TO "sql.user3" BY "sql.user1";
This example gives USAGE privilege on a sequence generator to sql.user2:
GRANT USAGE ON myseq to "sql.user2";
This example gives USAGE privilege on a sequence generator to multiple users
WITH GRANT OPTION:
GRANT USAGE ON myseq to "sql.user3","sql.user5" WITH GRANT
OPTION;
GRANT CREATE CATALOG Statement
Considerations for GRANT CREATE CATALOG
Examples for GRANT CREATE CATALOG
The GRANT CREATE CATALOG grants privileges to create a catalog for specified
users.
GRANT CREATE CATALOG TO {"grantee" [,"grantee"]...}