-- Create a table if it doesn't exist
CREATE TABLE IF NOT EXISTS employees (
id INTEGER PRIMARY KEY, -- Auto-incrementing ID in SQLite, serial in PostgreSQL, similar in DuckDB
name TEXT NOT NULL, -- Text field for employee name
position TEXT NOT NULL, -- Text field for position
salary REAL, -- Real number for salary
start_date DATE -- Date field for the employee's start date
);
-- Insert some example data into the table
INSERT INTO employees (id, name, position, salary, start_date) VALUES
(1, 'Alice Smith', 'Engineer', 85000, '2021-06-01'),
(2, 'Bob Johnson', 'Manager', 95000, '2020-05-15'),
(3, 'Charlie Brown', 'Analyst', 78000, '2022-03-01');-- Select all employees from the table SELECT * FROM employees;
This is an interactive web-based SQL notebook, a powerful tool that allows you to run SQLite commands directly from your browser, with no installation or server setup required. Inspired by the functionality of Jupyter notebooks, this app gives you the ability to write, run, and visualize SQLite queries in real time, all in a familiar notebook interface. Powered by the WebAssembly port of SQLite3 and Python, DB Fiddle brings the power of SQLite to the browser. Whether you're a developer, data analyst, or student, our app provides a lightweight and intuitive environment to work with SQLite databases on the go.
Experience a notebook-style interface where you can write and run SQL commands in individual cells. View results inline, making it easy to follow the output of each query. Keep track of your queries, results, and notes all in one place for easy reference.
The app runs a WebAssembly port of SQLite3, which means all database operations happen directly in your browser.
Easily share your queries, results, or individual SQL scripts online with others or export them to continue working outside the app.