使用GRANT可以将对象权限授予用户
- 例如,授予steve在products表上的SELECT、INSERT、UPDATE的对象权限和在employees表上的SELECT对象权限
- GRANT SELECT, INSERT, UPDATE ON store.products TO steve;
- GRANT SELECT ON store.employees TO steve;
授予steve更新last_name列和salary列的权限
- GRANT UPDATE (last_name, salary) ON store.employees TO steve;
- 在授予对象权限给用户的同时,也可以设置允许被授权用户将权限授予其他用户,例如给steve授予customers表的SELECT权限
- GRANT SELECT ON store.customers
- TO steve WITH GRANT OPTION;
- steve给gail授予customers表的SELECT权限
- CONNECT steve/button
- GRANT SELECT ON store.customers TO gail;