I want to specify WHERE col1 is in (1,2,3).
However, I have a long list of 1,2,3... and I use it in multiple queries so I want to store it as a variable.
DECLARE @list varchar = 1,2,3
DECLARE @list varchar = '1','2','3'
I checked a variable type matrix and couldn't find an applicable variable type.
Any idea? I would prefer not to create it as a table as it is only a list and I want to use it as a list and not a table.