Grant Permissions
Read Permission
| Database | Output |
|---|---|
| PostgreSQL | GRANT SELECT ON users TO analyst |
| MySQL | GRANT SELECT ON users.* TO 'analyst'@'localhost' |
Write Permission
| Database | Output |
|---|---|
| PostgreSQL | GRANT INSERT, UPDATE ON orders TO sales_app |
Delete Permission
All Permissions
| Database | Output |
|---|---|
| PostgreSQL | GRANT ALL PRIVILEGES ON users TO admin |
Multiple Permissions
All Tables
Revoke Permissions
Single Permission
| Database | Output |
|---|---|
| PostgreSQL | REVOKE DELETE ON users FROM intern |
All Permissions
| Database | Output |
|---|---|
| PostgreSQL | REVOKE ALL PRIVILEGES ON users FROM former_employee |
User Management
Create User
| Database | Output |
|---|---|
| PostgreSQL | CREATE USER john WITH PASSWORD 'secret123' |
| MySQL | CREATE USER IF NOT EXISTS 'john'@'localhost' IDENTIFIED BY 'secret123' |
Alter User Password
| Database | Output |
|---|---|
| PostgreSQL | ALTER USER john WITH PASSWORD 'newsecret456' |
| MySQL | ALTER USER 'john'@'localhost' IDENTIFIED BY 'newsecret456' |
Drop User
| Database | Output |
|---|---|
| PostgreSQL | DROP USER IF EXISTS john |
| MySQL | DROP USER IF EXISTS 'john'@'localhost' |
Role Management
Create Role
| Database | Output |
|---|---|
| PostgreSQL | CREATE ROLE analyst |
| MySQL | CREATE ROLE IF NOT EXISTS analyst |
Assign Role to User
| Database | Output |
|---|---|
| PostgreSQL | GRANT analyst TO john |
| MySQL | GRANT 'analyst' TO 'john'@'localhost' |
Revoke Role from User
| Database | Output |
|---|---|
| PostgreSQL | REVOKE analyst FROM john |
| MySQL | REVOKE 'analyst' FROM 'john'@'localhost' |
Drop Role
| Database | Output |
|---|---|
| PostgreSQL | DROP ROLE IF EXISTS analyst |
| MySQL | DROP ROLE IF EXISTS analyst |
Permission Types
| OmniQL | PostgreSQL | MySQL | Description |
|---|---|---|---|
READ | SELECT | SELECT | Read data |
WRITE | INSERT, UPDATE | INSERT, UPDATE | Create and modify |
DELETE | DELETE | DELETE | Remove records |
ALL | ALL PRIVILEGES | ALL PRIVILEGES | Full access |
Complete Examples
Read-Only Analyst
Application Service Account
Admin User
Database Support
| Feature | PostgreSQL | MySQL | MongoDB |
|---|---|---|---|
| GRANT/REVOKE | Yes | Yes | Via commands |
| CREATE/DROP USER | Yes | Yes | Via commands |
| ALTER USER | Yes | Yes | Via commands |
| CREATE/DROP ROLE | Yes | Yes | Via commands |
| ASSIGN/REVOKE ROLE | Yes | Yes | Via commands |
MongoDB Note
MongoDB uses role-based access control with built-in roles. OmniQL translates to MongoDB admin commands.Limitations
Not currently supported:- Column-level permissions
- Schema/database-level permissions
- Sequence permissions
- Role options (SUPERUSER, LOGIN, etc.)
- Multiple tables in single GRANT

