Sql

Asked • 03/19/19

Inserting multiple rows in a single SQL query?

I have multiple set of data to insert at once, say 4 rows. My table has three columns: `Person`, `Id` and `Office`. INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office"); INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office"); INSERT INTO MyTable VALUES ("Billy", 125, "London Office"); INSERT INTO MyTable VALUES ("Miranda", 126, "Bristol Office"); Can I `insert` all 4 rows in a single `SQL statement`?

1 Expert Answer

By:

Shervin Z. answered • 03/21/19

Tutor
4.8 (4)

Full Stack Developer by Day Tutor and programming mentor by night

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.