Pages

Ads 468x60px

Insert Multiple Rows Using Single Insert Statement : SQLServer2008

How insert multiple record in a table using one insert statement in sqlserver 2008?


SQL server 2005 OLD way
insert into Companies select 'EnigmaSoft'
union all select 'WebCatalyst'
union all select 'Awarebase'


SQL server 2008 NEW way
insert into Companies values('HCL'),('Oracle'),('Infosys')


For more read SqlAuthority Article

No comments:

Post a Comment