SQL Server – Comma Separated INSERT Option

 

Here is new feature of SQL Server 2008 – “Comma Separated INSERT Option”
In this feature using a single INSERT statement you can pass multiple value for the table using comma separated option.

USE testdb
GO
CREATE TABLE table1
(
    id INT IDENTITY(1,1),
    name VARCHAR(255),
    address VARCHAR(255)
)
SELECT * FROM testdb..table1

INSERT INTO testdb..table1
VALUES
('Varinder','ABC Street'),
('Amit', 'CDE Street'),
('Dinesh','XYZ Street')


Result :