----Create type-----
create type _table as table
(
E_Name varchar(50),
Salary varchar(200)
)
2. After that create Procedure in sql:=>here I have to use _table type as table-valued parameter in Procedure.
The table-valued parameter "@tablevariable" must be declared with the READONLY option.
------Create
procedure with the table-valued parameter---
as
begin
insert into mytable(Name,salary) select E_Name,Salary from @tablevariable
end
3. Create this method that contains multiple rows
create type _table as table
(
E_Name varchar(50),
Salary varchar(200)
)
2. After that create Procedure in sql:=>here I have to use _table type as table-valued parameter in Procedure.
The table-valued parameter "@tablevariable" must be declared with the READONLY option.
create proc
uspInsertBulkRow
@tablevariable
_table readonlyas
begin
insert into mytable(Name,salary) select E_Name,Salary from @tablevariable
end
3. Create this method that contains multiple rows


Ramdas ChavanPosted Feb 10, 2014, 12:59 AM
very helpful to me .Thank you -Ramdas Chavan