ShareShortcuts

ShortSQL

ShortSQL A real SQL database, inside one shortcut

uniquegaming
Fork “ShortSQL”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so uniquegaming gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
1K
Saved
1
Actions
4,323
Category
API
Version
1.0
Language
EN

ShortSQL

A real SQL database, inside one shortcut.

Tables, joins, encryption and backups on your iPhone. No app to install. No server. No account. Your data never leaves your iCloud Drive.


At a glance

Real SQLJOIN, GROUP BY, subqueries, UNION, transactions and 60+ functionsEncrypted databasesAES-256-GCM with a key only you know. Change it or turn it on any timePrivate databasesHidden from the console, for the shortcut that owns themBackup & restoreEvery database in one .ssql file. Move to a new iPhone in secondsHistoryYour last 20 queries, one tap to run againBeautiful resultsA clean table page in light or dark, or plain textDeveloper APIOne Run Shortcut action gives your shortcut a databaseFully offlineEverything runs on the device. Internet is only used to tell you about updates---

How it works

Run ShortSQL. That's the whole setup.

Tip: leave the prompt empty to open the menu. Type USE shop to switch database, KEY secret to unlock one, or exit to close.

Everything in the menu

OptionWhat it doesBrowse a tableSee its rows, no SQL neededDescribe a tableColumns, types, keys and defaultsHistoryRerun one of your recent queriesSwitch databaseOpen, create, or delete several at onceEnter key · EncryptionUnlock, encrypt later, change the key or remove itBackup & restoreSave one or all databases, or bring them backSettingsPage or text, appearance, start-up, rows shown. Every change is confirmedHelpA full SQL reference, built inWhat's newRelease notes for every versionDevelopersAPI guide, a copy-ready JSON template, the ShortSQL StarterSupportDiscord and Telegram---

Real SQL. Not a toy.

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;

Everything that's supported

  • Databases: CREATE (plain, ENCRYPTED, PRIVATE), ALTER DATABASE … KEY / DECRYPT / PRIVATE / PUBLIC, SHOW DATABASES, DROP
  • Tables: CREATE (incl. AS SELECT and LIKE), ALTER (add, drop, rename, modify, change columns, rename table), DROP, TRUNCATE, RENAME, DESCRIBE, SHOW TABLES, SHOW CREATE TABLE, SHOW INDEX
  • Writing: INSERT (multi-row, SELECT, SET), INSERT IGNORE, REPLACE, ON DUPLICATE KEY UPDATE, UPDATE and DELETE with ORDER BY / LIMIT
  • Reading: JOIN, LEFT / RIGHT / CROSS JOIN, GROUP BY, HAVING, DISTINCT, ORDER BY, LIMIT / OFFSET, subqueries (IN, EXISTS, scalar, derived tables), UNION / UNION ALL
  • Expressions: CASE, CAST, BETWEEN, LIKE, REGEXP, IS NULL, <=>, DIV, MOD, INTERVAL
  • Constraints: PRIMARY KEY, AUTO_INCREMENT, UNIQUE, NOT NULL, DEFAULT
  • Transactions: BEGIN / COMMIT / ROLLBACK; any ; script is saved only if every statement succeeds
  • Functions: text (CONCAT, 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, UPDATE and DELETE run as a few native actions, so big tables stay quick.


Your data, locked down

  • 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.
  • Change your mind later: ALTER DATABASE vault KEY 'new key' re-encrypts everything. It works on unencrypted databases too.
  • PRIVATE databases never show up in the console list.
  • Everything lives in iCloud Drive › Shortcuts › ShortSQL. Nothing is uploaded, ever.

Note: a lost key cannot be recovered. That's what makes it encryption.


Never lose a thing

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.


For shortcut developers

Stop juggling text files. Give your shortcut a real database in three actions:

  1. Text with a JSON request (or a Dictionary)
  2. Run Shortcut → ShortSQL
  3. Get Dictionary from Input → read rows, 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 }
  ]
}

FielddbrequiredDatabase namequeryrequired*One statement, or a ; script that saves all or nothingparamsoptionalA value for each ?, quoted safely: quotes, emoji, line breakskeyoptionalFor encrypted databasestable + rowsoptionalBulk insert, instead of a querycheck_updatesoptionalfalse keeps your shortcut 100% offlineReplyok``true, or false with an error messagerows · countAfter a SELECT``affected · insert_idAfter 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.

Ideas to build

  • Notes and to-do apps with search, tags and due dates
  • Expense and habit trackers with monthly totals
  • Inventory, collections and reading lists
  • Settings storage for your own shortcuts: INSERT … ON DUPLICATE KEY UPDATE
  • Logs from automations, queried later with GROUP BY

FAQ

Do 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.


Support & community

DiscordChat, updates, bug fixes and weekend funTelegramUpdates and bug fixes, straight to you---

ShortSQL · Developed by Anup

What's New

Version 1.0

First release

Version History
1.0 Oct 23, 2026

First release

What it does

4,323 actions
  1. If
  2. Text
  3. Set Variable
    RENDER_JS
  4. Text
  5. Set Variable
    ICON_DB
  6. Text
  7. Set Variable
    ICON_TABLE
  8. Text
  9. Set Variable
    ICON_HIST
  10. Text
  11. Set Variable
    ckey
  12. Text
  13. Set Variable
    gomenu
  14. Text
  15. Set Variable
    gopick
  16. Text
  17. Set Variable
    cdb
  18. Get File
  19. If
  20. Text
  21. Get Dictionary from Input
  22. If
  23. Text
  24. Get Dictionary from Input
  25. Get Dictionary Value
  26. Match Text
  27. If
  28. Set Variable
    s_html
  29. If
  30. Text
  31. Set Variable
    s_html
  32. Get Dictionary Value
  33. Match Text
  34. If
  35. Set Variable
    s_theme
  36. If
  37. Text
  38. Set Variable
    s_theme
  39. Get Dictionary Value
  40. Match Text
  41. If
  42. Set Variable
    s_start
  43. If
  44. Text
  45. Set Variable
    s_start
  46. Get Dictionary Value
  47. Match Text
  48. If
  49. Set Variable
    s_rows
  50. If
  51. Text
  52. Set Variable
    s_rows
  53. Get Dictionary Value
  54. Match Text
  55. If
  56. Set Variable
    s_lastdb
  57. If
  58. Text
  59. Set Variable
    s_lastdb
  60. Get Dictionary Value
  61. Match Text
  62. If
  63. Set Variable
    s_updates
  64. If
  65. Text
  66. Set Variable
    s_updates
  67. Match Text
  68. If
  69. Format Date
  70. Get File
  71. Text
  72. Text
  73. Match Text
  74. If
  75. Text
  76. Save File
  77. Text
  78. Get Dictionary from Input
  79. Set Variable
    upd
  80. Dictionary
  81. Set Dictionary Value
  82. Set Dictionary Value
  83. Set Dictionary Value
  84. Replace Text
  85. Replace Text
  86. Text
  87. Make Rich Text from HTML
  88. Set Name
  89. Set Name
  90. Replace Text
  91. Set Variable
    _jsr
  92. Match Text
  93. If
  94. Text
  95. Make Rich Text from HTML
  96. Set Name
  97. Set Name
  98. Replace Text
  99. Set Variable
    _jsr
  100. Match Text
  101. If
  102. Text
  103. Make Rich Text from HTML
  104. Set Name
  105. Set Name
  106. Replace Text
  107. Set Variable
    _jsr
  108. Replace Text
  109. URL Encode
  110. Match Text
  111. If
  112. Get Dictionary from Input
  113. Set Variable
    upd
  114. Get Dictionary Value
  115. Match Text
  116. If
  117. Get Dictionary Value
  118. Text
  119. Set Name
  120. Get Contacts from Input
  121. Choose from List
  122. Text
  123. Match Text
  124. If
  125. URL
    https://discord.gg/sS5Wqa4TNp
  126. Open URLs
  127. Stop This Shortcut
  128. Match Text
  129. If
  130. URL
    https://t.me/ios_shortcuts
  131. Open URLs
  132. Stop This Shortcut
  133. Get Dictionary Value
  134. Match Text
  135. If
  136. Match Text
  137. If
  138. Get Dictionary Value
  139. Match Text
  140. If
  141. Get Dictionary Value
  142. Show Alert
    Update required
  143. Get Dictionary Value
  144. URL
    …
  145. Open URLs
  146. Stop This Shortcut
  147. If
  148. Get Dictionary Value
  149. Text
  150. Text
  151. Set Name
  152. Get Contacts from Input
  153. Choose from List
  154. Text
  155. Match Text
  156. If
  157. Get Dictionary Value
  158. URL
    …
  159. Open URLs
  160. Stop This Shortcut
  161. Text
  162. Match Text
  163. If
  164. Get File
  165. If
  166. Set Variable
    cdb
  167. If
  168. Dictionary
  169. Set Dictionary Value
  170. Set Dictionary Value
  171. Set Dictionary Value
  172. Text
  173. Set Dictionary Value
  174. Run Shortcut
  175. Get Dictionary from Input
  176. Get Dictionary Value
  177. Repeat with Each
  178. Get Dictionary Value
  179. Combine Text
  180. Match Text
  181. Repeat with Each
  182. Text
  183. Combine Text
  184. Text
  185. Set Name
  186. Get Contacts from Input
  187. Choose from List
  188. Text
  189. Match Text
  190. If
  191. Text
  192. Set Variable
    gomenu
  193. Match Text
  194. If
  195. Dictionary
  196. Set Dictionary Value
  197. Set Dictionary Value
  198. Set Dictionary Value
  199. Text
  200. Set Dictionary Value

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by uniquegaming

See All

You Might Also Like

See All
Advertisement