Last active
April 1, 2021 12:46
-
-
Save bradsi/6bb7b7bd392b846ae2985db9f893695b to your computer and use it in GitHub Desktop.
SQL Commands that deal with the manipulation of data.
- INSERT
- UPDATE
- DELETE
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
-- insert single entry into table | |
INSERT INTO users (first_name, last_name, email) | |
VALUES ('John', 'Smith', 'johnsmith@gmail.com'); | |
-- insert multiple entries | |
INSERT INTO users (first_name, last_name, email) | |
VALUES ('John', 'Smith', 'johnsmith@gmail.com'), | |
('John', 'Doe', 'johndoe@gmail.com'); | |
-- update | |
UPDATE users | |
SET email = 'newemail@gmail.com' | |
WHERE id = 1; | |
-- delete | |
DELETE FROM users WHERE id = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment