API • Updated 2 hours ago
Download Shortcut Add to Collection Like (2)ShareShortcuts Member:

Tables, joins, encryption and backups on your iPhone. No app to install. No server. No account. Your data never leaves your iCloud Drive.
| Real SQL | JOIN, GROUP BY, subqueries, UNION, transactions and 60+ functions |
| Encrypted databases | AES-256-GCM with a key only you know. Change it or turn it on any time |
| Private databases | Hidden from the console, for the shortcut that owns them |
| Backup & restore | Every database in one .ssql file. Move to a new iPhone in seconds |
| History | Your last 20 queries, one tap to run again |
| Beautiful results | A clean table page in light or dark, or plain text |
| Developer API | One Run Shortcut action gives your shortcut a database |
| Fully offline | Everything runs on the device. Internet is only used to tell you about updates |
Run ShortSQL. That's the whole setup.



Tip: leave the prompt empty to open the menu. Type
USE shopto switch database,KEY secretto unlock one, orexitto close.
| Option | What it does |
|---|---|
| Browse a table | See its rows, no SQL needed |
| Describe a table | Columns, types, keys and defaults |
| History | Rerun one of your recent queries |
| Switch database | Open, create, or delete several at once |
| Enter key · Encryption | Unlock, encrypt later, change the key or remove it |
| Backup & restore | Save one or all databases, or bring them back |
| Settings | Page or text, appearance, start-up, rows shown. Every change is confirmed |
| Help | A full SQL reference, built in |
| What's new | Release notes for every version |
| Developers | API guide, a copy-ready JSON template, the ShortSQL Starter |
| Support | Discord and Telegram |
CREATE TABLE expenses (
id INT PRIMARY KEY AUTO_INCREMENT,
item VARCHAR(80) NOT NULL,
amount DECIMAL(10,2) NOT NULL,
tag TEXT DEFAULT 'other',
spent DATE DEFAULT (CURRENT_DATE)
);
-- Where did my money go this month?
SELECT tag, COUNT(*) AS times, SUM(amount) AS total
FROM expenses
WHERE spent >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
GROUP BY tag
ORDER BY total DESC;
CREATE (plain, ENCRYPTED, PRIVATE), ALTER DATABASE … KEY / DECRYPT / PRIVATE / PUBLIC, SHOW DATABASES, DROPCREATE (incl. AS SELECT and LIKE), ALTER (add, drop, rename, modify, change columns, rename table), DROP, TRUNCATE, RENAME, DESCRIBE, SHOW TABLES, SHOW CREATE TABLE, SHOW INDEXINSERT (multi-row, SELECT, SET), INSERT IGNORE, REPLACE, ON DUPLICATE KEY UPDATE, UPDATE and DELETE with ORDER BY / LIMITJOIN, LEFT / RIGHT / CROSS JOIN, GROUP BY, HAVING, DISTINCT, ORDER BY, LIMIT / OFFSET, subqueries (IN, EXISTS, scalar, derived tables), UNION / UNION ALLCASE, CAST, BETWEEN, LIKE, REGEXP, IS NULL, <=>, DIV, MOD, INTERVALPRIMARY KEY, AUTO_INCREMENT, UNIQUE, NOT NULL, DEFAULTBEGIN / COMMIT / ROLLBACK; any ; script is saved only if every statement succeedsCONCAT, SUBSTRING, REPLACE, LPAD…), numbers (ROUND, ABS, POWER…), dates (NOW, DATE_ADD, DATEDIFF, DATE_FORMAT…), logic (IF, IFNULL, COALESCE…), totals (COUNT, SUM, AVG, MIN, MAX, GROUP_CONCAT)Simple
SELECT,COUNT,UPDATEandDELETErun as a few native actions, so big tables stay quick.
CREATE DATABASE vault ENCRYPTED encrypts every table with AES-256-GCM. The key is stretched with PBKDF2 (100,000 rounds), so guessing it is slow.ALTER DATABASE vault KEY 'new key' re-encrypts everything. It works on unencrypted databases too.PRIVATE databases never show up in the console list.Note: a lost key cannot be recovered. That's what makes it encryption.
Menu › Backup & restore saves one database, or all of them, into a single .ssql file. Keep it in Files, AirDrop it to a new iPhone, restore it there. Encrypted databases stay encrypted inside the backup.
Stop juggling text files. Give your shortcut a real database in three actions:
ShortSQLrows, affected or error{
"db": "myapp",
"query": "SELECT id, title FROM notes WHERE done = ?",
"params": [0]
}
Reply:
{
"ok": true,
"count": 2,
"rows": [
{ "id": "1", "title": "Buy milk" },
{ "id": "2", "title": "Call mom" }
]
}
Bulk insert: many rows, one call, all or nothing:
{
"db": "myapp",
"table": "notes",
"rows": [
{ "title": "Buy milk" },
{ "title": "Call mom", "done": 1 }
]
}
| Field | ||
|---|---|---|
db | required | Database name |
query | required* | One statement, or a ; script that saves all or nothing |
params | optional | A value for each ?, quoted safely: quotes, emoji, line breaks |
key | optional | For encrypted databases |
table + rows | optional | Bulk insert, instead of a query |
check_updates | optional | false keeps your shortcut 100% offline |
| Reply | |
|---|---|
ok | true, or false with an error message |
rows · count | After a SELECT |
affected · insert_id | After INSERT, UPDATE, DELETE |
ShortSQL Starter · View in Editor: install it from Menu › Developers for copy-ready blocks (setup, insert, select, update, bulk insert, encryption, private databases). The complete API guide is built into the console too.
INSERT … ON DUPLICATE KEY UPDATEGROUP BYDo I need the internet?
No. Everything runs on your iPhone. When you happen to be online, ShortSQL checks once in a while for a new version.
Will updating delete my data?
Never. Your databases live in iCloud Drive, not inside the shortcut.
Can other people's shortcuts read my databases?
Any shortcut you run can call ShortSQL. That's how the API works. Use ENCRYPTED for anything sensitive: without the key, the data is unreadable.
What isn't supported?
Users and GRANT, views, triggers and stored procedures. It's a personal database with one request at a time, not a server.
Does the name matter?
Yes. Keep it named ShortSQL exactly, so other shortcuts can find it.
| Discord | Chat, updates, bug fixes and weekend fun |
| Telegram | Updates and bug fixes, straight to you |
ShortSQL · Developed by Anup
Extensions:
Siri is supported