For inserting multiple rows using one insert statement you can do as following example :
declare @dept table
(
DeptId int identity(1,1) not null,
DeptName nvarchar(500)
)
insert into @dept values ('sales'),('marketting'),('hr'),('IT')
select * from @dept
SQL fiddle can be check here
No comments:
Post a Comment