Created
August 20, 2020 12:11
-
-
Save gbarreiro/89e1edf7df0ed5ecdf6191c2a12dd521 to your computer and use it in GitHub Desktop.
MySQL cheatsheet: insert a row
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 a single row, providing a value for each column | |
INSERT INTO Students VALUES (1, 'Peter', 25); | |
-- Insert a single row, not providing a value for every column | |
INSERT INTO Students(id, name) VALUES (1, 'Peter'); | |
-- Insert multiple rows at the same time | |
INSERT INTO Students VALUES (1, 'Peter', 25), (2, 'Frank', 19), (3, 'William', 21); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment