I have a Transact-SQL query that uses the IN operator. Something like this:
select * from myTable where myColumn in (1,2,3,4)
Is there a wa
DECLARE @myList TABLE (Id BIGINT) INSERT INTO @myList(Id) VALUES (1),(2),(3),(4);
select * from myTable where myColumn in(select Id from @myList)
Please note that for long list or production systems it's not recommended to use this way as it may be much more slower than simple IN
operator like someColumnName in (1,2,3,4)
(tested using 8000+ items list)