Which is faster?
SELECT UserName FROM dbo.UserTable WHERE UserID in (1,3,4)
SELECT UserName FROM dbo.UserTable WHERE UserID = 1 OR UserID = 3 OR UserID = 4
Due to Sql Server's optimization of queries these will run at the same speed since they are logically equivalent.
i favor the IN syntax for brevity and readability though.
1.4m articles
1.4m replys
5 comments
57.0k users