Created
September 20, 2022 10:13
-
-
Save toyeiei/629c468e4f5e1d158edf4384c664b2a4 to your computer and use it in GitHub Desktop.
blog - create a new database in sqlite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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