Is it possible to declare/create the table type param(TVP) in Stored Procedure itself instead of creating the table value type separately in the schema and then using it in Stored procedure. i.e.,
create procedure proc1(
@table1 table(id int) readonly
)
as
begin
select top 1 * from sysobjects
end
From MSDN:
So it is clearly said that you can't declare TVP in stored procedure like you want - only by creating as user-defined type.