Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Created September 20, 2022 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toyeiei/629c468e4f5e1d158edf4384c664b2a4 to your computer and use it in GitHub Desktop.
Save toyeiei/629c468e4f5e1d158edf4384c664b2a4 to your computer and use it in GitHub Desktop.
blog - create a new database in sqlite
.open pizzas.db
-- drop table pizza;
CREATE TABLE pizza (
id int,
name text,
calorie int,
price real
);
INSERT INTO pizza VALUES
(1, "Hawaiian", 500, 25.75),
(2, "Chicken", 480, 24.50),
(3, "Spicy", 250, 22.35),
(4, "BBQ", 390, 26.25),
(5, "Supreme Cheese", 680, 32.50);
.mode column
.header on
SELECT * FROM pizza;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment