REVOKE removes previously granted privileges, roles, or quotas from users or roles in ClickHouse.
REVOKE strips a user or role of previously granted privileges, roles, or quotas. Use it to tighten security, clean up unused access, or correct accidental GRANTs.
Start with the privilege list, optionally add ON
object, then use FROM
followed by users or roles. Append GRANTED BY
when removing rights granted by another account.
Run:REVOKE SELECT ON ecommerce.Customers FROM analyst;
This prevents analyst
from reading customer data while leaving other rights intact.
UseREVOKE ALL PRIVILEGES ON *.* FROM sales_role;
to wipe every permission the sales_role
holds across all databases and tables.
Yes. Separate principals with commas:REVOKE INSERT, UPDATE ON ecommerce.Orders FROM alice, bob;
Grant privileges to roles, not individuals, then assign roles to users. Review privilege sets periodically and automate revocations when employees change teams.
Error: “Privilege not found” occurs when you omit the ON
clause. Always specify the object unless revoking global rights.
Error: Revoking from a user who inherited rights from a role does nothing. Revoke from the role instead or detach the role from the user.
No. ClickHouse ignores missing privileges, so the command completes without error.
ClickHouse executes REVOKE immediately; transactions are not supported for DCL statements.
Query system.grants
and system.role_grants
to audit existing privileges and role assignments.