I want to run a query like this:
SELECT * FROM Studio WHERE Id IN (134, 144, 132, 138, 7432, 7543, 2566)
but the amount of Id's passed to the IN clause is only determined at runtime.
Do I have to use dynamic SQL or can this be done with a stored procedure?
UPDATE:
If either option is available, which one is better?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…