Basic permission management commands.

Grants privileges (SELECT, INSERT, UPDATE, DELETE, EXECUTE, etc.) on database objects to users or roles. Principle of least privilege: grant only what is needed. Roles simplify permission management by grouping privileges.

Compatibility

Filter by Database
SQL GRANT / REVOKE Compatibility Across Databases
Database System Support Status Since Version Notes
MySQL Native 8.0 MySQL supports GRANT and REVOKE for managing user permissions.
PostgreSQL Native 7.0 PostgreSQL uses a different model for granting roles and revoking privileges.
SQL Server Native 2016 SQL Server supports GRANT and REVOKE for managing user permissions.
Oracle Native 7 Oracle's permission model is built on GRANT and REVOKE. Privileges are granted directly or via roles.
SQLite Not Supported - SQLite does not implement SQL GRANT/REVOKE or a built-in user/role privilege model.

Details

Understanding how to manage access control is crucial for database security and administration.

Standard Syntax

Version Support

MySQL: Native since 8.0 PostgreSQL: Native since 7.0 SQL Server: Native since 2016 Oracle: Native since 7 SQLite: Not supported

Per-Database Syntax & Notes