I created a table value type that is created perfectly.
CREATE TYPE [ContactTemplate] AS TABLE ( [Email] VARCHAR(100), [FirstName] VARCHAR(50), [LastName] VARCHAR(50) ) GO
Then, when I try to create a procedure:
CREATE PROCEDURE [dbo].[usp_ProcessContact] ( @Email VARCHAR(100), @FirstName VARCHAR(50), @LastName VARCHAR(50), @Contact ContactTemplate READONLY) as Begin
I keep getting error when
@Contact ContactTemplate READONLY" The parameter @Contact cannot be declared READONLY since it is not a table valued parameter
I tried a lot of things, removing dbo , brackets, etc., but still can't get it to work. Help me please.
source share