You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass into and process more rows in SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
The text was updated successfully, but these errors were encountered:
description: MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when passing more rows into SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
=>
MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass and process more rows in SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
description: MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass and process more rows in SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
=>
MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass into and process more rows in SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
Submitted by: @cincuranet
Is duplicated by CORE2549
Votes: 2
MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass into and process more rows in SP.
Example:
create type testRow as table (id int, s nvarchar(200), y datetime);
create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end
declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;
The text was updated successfully, but these errors were encountered: