How to use the SQL GRANT / REVOKE Generator
1. Choose GRANT or REVOKE and select the privileges to assign or remove.
2. Set the scope: specific table, entire database, or all databases.
3. Enter the username (format: user@host for MySQL). The SQL is generated live.
What is it?
GRANT gives a database user permission to perform specific operations. REVOKE removes those permissions. Granular permissions (SELECT only, no DELETE) enforce the principle of least privilege — application users should have only the access they need to function.
The WITH GRANT OPTION allows the recipient to grant the same privileges to other users — use it only for admin accounts.
Benefits
Generate INSERT and CREATE TABLE statements instantly
Convert JSON, CSV, or a field list into ready-to-run SQL in seconds — no manual quoting, no counting columns, no copy-paste errors from spreadsheet data.
Build SELECT queries without memorising syntax
The visual query builder constructs WHERE conditions, ORDER BY, LIMIT, and DISTINCT clauses interactively — useful for anyone who writes SQL occasionally rather than daily.
Migrate between MongoDB and relational databases
Convert MongoDB find, insert, update, and delete operations directly to SQL equivalents — speed up data migration planning or schema exploration.
All your data stays in the browser
No SQL query, schema definition, or database content is ever uploaded to a server. Everything runs entirely client-side, making these tools safe to use with sensitive data.
Frequently asked questions
Do I need to run FLUSH PRIVILEGES after GRANT?
No — GRANT and REVOKE statements update the privilege tables and take effect immediately. FLUSH PRIVILEGES is only needed if you modify the grant tables directly with INSERT/UPDATE.
What format is the username?
In MySQL: 'username'@'hostname' — e.g. 'app_user'@'localhost' or 'app_user'@'%' for any host. In PostgreSQL and MSSQL, just the username without the @host part.