I have declared a variable that has a table type as such:
DECLARE @MyTable GenderTableType
It has only one colum called 'Gender'.
I want to insert into the new table type paramter values but from within a stored procedure as such:
INSERT INTO @MyTable(Gender)
VALUES ('M'), ('F')
But I can't do this within a stored procedure because the in the declaration part it wants table type parameters to be READONLY. How do I go about inserting values from within a stored prodecure?