Usage

Run SQL Safely (and with AI)

Use SQLitePilot’s SQL runner to execute commands, preview destructive impact, and optionally draft queries with AI.

Last updated: Dec 8, 2025

The SQL panel lets you write queries, double-check risky commands, and keep a history of everything you run. Use it any time you need to inspect or change data.

Step 1: Confirm the connection

  1. Open the Dashboard.
  2. Make sure the blue badge shows the connection you want to work with. Switch if needed and click Connect again.
  3. Glance at the SQL Command History card to see what has run recently on this connection.

Step 2: Write or generate SQL

  1. Type or paste your SQL into the editor inside the Execute SQL Command card.
  2. The Execute button stays disabled until the editor has text and a connection is selected.
  3. Need help writing a query? Describe what you want (for example “show the 10 most recent invoices”) and click Generate SQL with AI. SQLitePilot fills the editor with a draft you can review.

Step 3: Review safety prompts

  1. When you run commands that delete, update, drop, or alter data, SQLitePilot shows a confirmation window.
  2. The window explains what the command will do and, when possible, estimates how many rows will be affected.
  3. Only choose Yes, execute if the summary matches your intention. Otherwise cancel and adjust the SQL.

Step 4: Execute and read the results

  1. After you confirm, the command runs on the remote server. A spinner appears while SQLitePilot waits for a response.
  2. Successful commands show the returned rows or a short “Success” message. Errors appear in red text so you can fix the query.
  3. Every successful command is added to SQL Command History with your name and a timestamp for quick reference.

Step 5: Wrap up safely

  • Clear the editor between different tasks so you do not re-run the wrong command.
  • Disconnect from the connection when you are done working.
  • Treat AI-generated SQL as a starting point and always review table names and WHERE clauses before running it.

Follow these steps each time and you will be able to run SQL confidently without leaving the browser.