In TSQL (SQL Server), How do I insert multiple rows WITHOUT repeating the "INSERT INTO dbo.Blah" par

Posted by Timothy Khouri on Stack Overflow See other posts from Stack Overflow or by Timothy Khouri
Published on 2010-04-12T19:18:48Z Indexed on 2010/04/12 19:23 UTC
Read the original article Hit count: 404

Filed under:
|
|

I know I've done this before years ago, but I can't remember the syntax, and I can't find it anywhere due to pulling up tons of help docs and articles about "bulk imports".

Here's what I want to do, but the syntax is not exactly right... please, someone who has done this before, help me out :)

INSERT INTO dbo.MyTable (ID, Name)
VALUES (123, 'Timmy'),
    (124, 'Jonny'),
    (125, 'Sally')

I know that this is close to the right syntax. I might need the word "BULK" in there, or something, I can't remember. Any idea?

© Stack Overflow or respective owner

Related posts about tsql

Related posts about bulkinsert