3. Statements : OpenROAD SQL Statements : Grant (privilege) Statement : Examples—Grant (privilege) Statement
 
Share this page                  
Examples—Grant (privilege) Statement
The following are grant (privilege) statement examples:
1. Grant select and update privileges on the salary table to the group, acct_clerk.
grant select, update on table salary
    to group acct_clerk;
2. Grant update privileges on the columns, empname and empaddress, in the employee table to the users, joank and gerryr.
grant update(empname, empaddress)
    on table employee
    to joank, gerryr;
3. Grant permission to the public to execute the monthly_report procedure.
grant execute on procedure monthly_report
    to public;
4. Grant unlimited rows to the role identifier, update_emp, which allows unlimited rows to be returned to any application that is associated with the role identifier, update_emp.
grant noquery_row_limit on database new_acct
    to role update_emp;
5. Enable the inventory_monitor role to register for and raise the stock_low database event.
grant register, raise on dbevent stock_low
    to role inventory_monitor;
6. Enable any employee in accounting to change columns containing salary information.
grant update on employee.salary, employee.socsec
    to group accounting;
7. Enable any user to create a table constraint that references the employee roster.
grant references on emp_roster to public;