Created
November 22, 2022 19:08
-
-
Save parkerfoshay/89175c9edca9ed42a38b316d88754961 to your computer and use it in GitHub Desktop.
L2-Inserting
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 INTO users (first_name, last_name, phone, age) | |
VALUES | |
('Nancy', 'Smith', "5234560987", 29); | |
INSERT INTO users (first_name, last_name, phone, age) | |
VALUES | |
('Douglas', 'Lowel', "5234768907", 23), | |
('Kai', 'Tran', "9198761234", 43), | |
('Linzey', 'Rivers', "7659023456", 54), | |
('Mira', 'Chan', "7650981234", 88); |
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
db.users.insertOne( | |
{ | |
first_name: "John", | |
last_name: "Doe", | |
phone: "123-456-7890", | |
age: 25 | |
} | |
) | |
db.users.insertMany([ | |
{ | |
first_name: "John", | |
last_name: "Doe", | |
phone: "123-456-7890", | |
age: 25 | |
}, | |
{ | |
first_name: "Jane", | |
last_name: "Doe", | |
phone: "123-602-5612", | |
age: 34, | |
}, | |
{ | |
first_name: "Joe", | |
last_name: "Doe", | |
phone: "785-456-9812", | |
age: 45, | |
} | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment