Monday, March 04, 2013 6:04 AM
I want insert many Data in my table (for example 500 Rows) and i don't repeating "Insert to".
How exist script for it?
Monday, March 04, 2013 8:23 AM
Since SQL Server 2008 insert statements with multiple rows value are support; for example this script insert 3 rows, seprated by a comma:
INSERT INTO myTable (col1, col2) VALUES ('val01', 'val02') , ('val11', 'val12') , ('val21', 'val22')
Olaf HelperBlog Xing
- Marked As Answer by Iric WenModerator Tuesday, March 12, 2013 7:42 AM
Monday, March 04, 2013 9:34 AM
What is your data source?
You can use a INSERT INTO ... SELECT if your source is another Table.
INSERT INTO dbo.DestinationTable SELECT * FROM dbo.SourceTable