SyntaxFix
Write A Post
Hire A Developer
Questions
DECLARE @mylist TABLE (Id int) INSERT INTO @mylist SELECT id FROM (VALUES (1),(2),(3),(4),(5)) AS tbl(id) SELECT * FROM Mytable WHERE theColumn IN (select id from @mylist)