Does anyone know the syntax to grant the truncate table privilege to a role
Printable View
Does anyone know the syntax to grant the truncate table privilege to a role
grant drop any table to role_name
Thanks pando, I assume theres no way to explictly name the table that can be truncated?
Nop. Grant to drop any table is not selective.
If you don't want to give DROP ANY TABLE priviledge (I know I would feel uncomfortable when giving such a powerful priviledge to any user) to a user in order to enable him to truncate some tables that he doesn't own, the only other alternative is:
- First, as an owner of a table create a procedure that truncates that table
- Then grant execute priviledge on that procedure to a user