Insert multiple rows at a time in sql server
synatax:
insert into @extable(id,firstname,lastname)
values(val1,val2,val3),
(val4,val5,val6)
example
declare @extable table(id int,firstname varchar(50),lastname varchar(50)
insert into @extable(id,firstname,lastname)
values(1,'krishna','kumar'),
(2,'kalyan','goud'),
(3,'praveen','kumar')
select * from @extable
Comments
Post a Comment