SQL Commands
SQL Commands
For example, if you wanted to grant select, insert, update, and delete privileges on a table called suppliers to a user
name smithj, you would execute the following statement:
You can also use the all keyword to indicate that you wish all permissions to be granted. For example:
If you wanted to grant select access on your table to all users, you could grant the privileges to the public keyword.
For example:
For example, if you wanted to revoke delete privileges on a table called suppliers from a user named anderson, you
would execute the following statement:
If you wanted to revoke all privileges on a table, you could use the all keyword. For example:
If you had granted privileges to public (all users) and you wanted to revoke these privileges, you could execute the
following statement:
When dealing with functions and procedures, you can grant users the ability to execute these functions and
procedures. The Execute privilege is explained below:
Privilege Description
For example, if you had a function called Find_Value and you wanted to grant execute access to the user named
smithj, you would execute the following statement:
If you wanted to grant all users the ability to execute this function, you would execute the following:
If you wanted to revoke execute privileges on a function called Find_Value from a user named anderson, you would
execute the following statement:
If you had granted privileges to public (all users) and you wanted to revoke these privileges, you could execute the
following statement: