Skip to content

Instantly share code, notes, and snippets.

@parkerfoshay
Created November 22, 2022 19:08
Show Gist options
  • Save parkerfoshay/89175c9edca9ed42a38b316d88754961 to your computer and use it in GitHub Desktop.
Save parkerfoshay/89175c9edca9ed42a38b316d88754961 to your computer and use it in GitHub Desktop.
L2-Inserting
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);
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