Inserting Multiple Values Into Table in SQL Server

If you need to insert multiple values into table it can be made with one of these methods:

  • write multiple rows after VALUES clause of INSERT command

I used here a thing called table-value constructor. You can read more about it in the MSDN article Table Value Constructor (Transact-SQL)

  • use INSERT INTO … SELECT with UNION ALL

Important! The first method can be used in SQL Server 2008 version or higher.

Leave a Reply

Your email address will not be published. Required fields are marked *