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

Benefits of Stored Procedures?

0 Answers   Wipro,


what is Full Text Search ?

1 Answers   TCS,


What is the purpose of optimization?

0 Answers  


List the different types of joins?

0 Answers  


Can you explain important index characteristics?

0 Answers  






what is a check constraint?

0 Answers  


Explain about SQLOS?

0 Answers  


Simple example for difference between select and cursor in sql

1 Answers  


What are dml (data manipulation language) statements in ms sql server?

0 Answers  


Define compound operators?

0 Answers  


What is a partitioned view?

0 Answers  


Where do we use trace frag?

0 Answers  


Categories