Last active
April 19, 2024 08:11
-
-
Save nguyenhaison183/082ba6b908de9c47ce8bd66eb73fb2b4 to your computer and use it in GitHub Desktop.
Project: Create a table | Codecademy | Analyze data with SQL | 1. Getting started with SQL | Manipulation
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
CREATE TABLE friends ( | |
id INTEGER, | |
name TEXT, | |
birthday DATE | |
); | |
INSERT INTO friends | |
VALUES (1, 'Jane Doe', 1990-05-30); | |
SELECT * | |
FROM friends; | |
INSERT INTO friends | |
VALUES (2, 'Vu Minh', 1993-08-27); | |
INSERT INTO friends | |
VALUES (2, 'Hai Son', 1993-03-18); | |
UPDATE friends | |
SET name = 'Jane Smith' | |
WHERE ID = 1; | |
ALTER TABLE friends | |
ADD COLUMN email TEXT; | |
UPDATE friends | |
SET email = 'jane@codecademy.com' | |
WHERE id = 1; | |
DELETE FROM friends | |
WHERE id = 1; | |
SELECT * | |
FROM friends; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment