I’m new to SQL and am now working with stored procedures.
I was watching another developer’s code and I saw this statement:
ALTER PROCEDURE [deleteRecords_UNICODE]
@RecordIDs ty_NumberList READONLY
Question 1: What does the “ty_NumberList” mean?
Question 2: I’m creating a stored procedure that needs to use the above parameter.
When I created “DECLARE @RecordNum int”, I obviously got the error of
Operand type clash: int is incompatible with ty_NumberList
I’m guessing I have to resolve this by:
a) Creating a variable of type “ty_NumberList”
b) then go with my usual DECLARE @RecordNum int
c) Then pass the value of @RecordNum into ty_NumberList
Question 3: How would I go about implementing the above steps in SQL?
Any help would be greatly appreciated!
ty_NumberListis the type of a table valued parameter.You would use it like