JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Coda to SQL
Coda to SQL
SQL Adventures
Projects
Links & Resources
More
Share
Explore
SQLite Fiddle
To test your SQL queries, you can use
SQLite Fiddle
. Start by pasting the SQL table below to complete the following
SQL Function Puzzles
. Below are the steps.
SQLite Fiddle for the Puzzles
Open SQLite Fiddle:
https://sqlite.org/fiddle/index.html
Switch to the SQL Schema view:
This is where you’ll create your tables and add data.
On the
left-hand side
, click the
Toggle view
button (if needed) to expand the panel (make sure the
side-by-side
checkbox is checked ✅ ).
Use the
dropdown at the top
of that panel and select
sqlite-schema
.
Create tables:
Start with
DROP TABLE IF EXISTS
to avoid errors from previous runs
SQL
14 lines
Insert sample data (under the previous script)
SQL
11 lines
Run the schema
Click
Run
(the grey Run button above the panel) to initiate tables and add the data.
Write and test queries
You can write queries
directly in the SQL Schema panel
below the table initiation code. Example:
SQL
4 lines
Toggle into terminal mode
You can switch to the terminal to type queries interactively.
Make sure tables already exist, otherwise you’ll get errors.
Limitation:
you won’t see the tables in the terminal view, so it’s mainly for running queries once tables exist.
Iterate and refine
If you want to edit tables or data, do it in the
SQL Schema
panel.
If you only want to test queries, use the
terminal mode
panel.
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
Ctrl
P
) instead.