is it possible to use a variable in a query with the IN
clause (a,b,c..z), without getting quotes or conversion
errors?

Answers were Sorted based on User's Feedback



is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes ..

Answer / guest

You can use a variable as your IN clause, but this requires
that you use the EXEC function to run the statement.

Is This Answer Correct ?    2 Yes 1 No

is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes ..

Answer / kishor kumar

It is possible by using Dynamic SQL.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Does an index slow down updates on indexed columns?

0 Answers  


What is the differecne between equi-join and inner-join and natural join..Is there any difference or all are same?

8 Answers   Microsoft,


Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

0 Answers  


What is the difference between join and inner join?

0 Answers  


Are all views updatable ?

0 Answers   MCN Solutions,






Tell me extended events in sql server 2008?

0 Answers  


What is instead of dml trigger?

0 Answers  


How to defragment table indexes?

0 Answers  


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

0 Answers  


Is sql server free?

0 Answers  


What is difference between joins and subqueries?

0 Answers  


What are the differences between sql server and mysql.

0 Answers  


Categories