RSS Feed

Multiple Choice Questions - SQL GRANT

Multiple Choice Questions - SQL GRANT

1. If suppose a table has SELECT permission denied on it and then the SELECT permission is granted on that table, the DENY permission is then removed on that table.

A) True
B) False

2. GRANT ALL ON Table_1 to A;

In above statement ALL means:

A) ALL means DELETE, INSERT, REFERENCES, SELECT, and UPDATE
B) ALL means DELETE, INSERT, SELECT, and UPDATE
C) ALL means DELETE, INSERT and UPDATE
D) None of above

3. GRANT SELECT ON Table_1 to role_A WITH GRANT OPTION;

A) Above statement gives an optional GRANT to role_A.
B) Above statement gives role_A the right to GRANT the same permission to others.
C) With "WITH GRANT OPTION" in above statement user is allowed GRANT on whole database.
D) None of above.

4. DENY and REVOKE remove any GRANT permission on a securable.

A) True
B) False

5. If INSERT permission is denied on tables at the database level, and INSERT on a specific table in that database is granted at the schema level

A) the result is that INSERT is granted on a particular table at schema level.
B) the result is that INSERT is granted on all tables with some restrictions.
C) the result is that INSERT is granted on a particular table at schema level with some restrictions.
D) the result is that INSERT is denied on all tables.

6. GRANT SELECT ON Table_1 to role_A WITH GRANT OPTION;

Which is the better option to revoke the above GRANT:

A) REVOKE SELECT ON Table_1 FROM role_A
B) REVOKE SELECT ON Table_1 FROM role_A CASCADE
C) REVOKE SELECT ON Table_1 FROM role_A WITH GRANT OPTION
D) REVOKE SELECT ON Table_1 FROM role_A ALL

7. If you want to grant demo_role the permission to create stored procedure then which of the below query can be used?

A) GRANT demo_role CREATE PROCEDURE
B) GRANT CREATE PROCEDURE TO demo_role CASCADE
C) GRANT CREATE PROCEDURE TO demo_role
D) GRANT CREATE PROC TO demo_role

8. REVOKE removes any GRANT but does not remove DENY permission on a securable.

A) True
B) False

9. The ……….. system stored procedure reports permissions on a database-level securable.

A) sp_helprime
B) sp_helfile
C) sp_helprotect
D) sp_helproject

10. If INSERT permission is granted on all tables at the database scope, and INSERT is denied on a specific table in the database (schema scope)

A) INSERT is then denied on that specific table including all sub tables.
B) INSERT is then denied on all primary tables.
C) INSERT is then denied on all sys tables.
D) INSERT is then denied on that specific table.

Answers