2 votes

SQL Query execution with IN statement

N'''2'',''3''' is a scalar value - as in a string: "'2','3'". SqlServer treats it as a singular string, when you use it as a parameter in your query. One solution could be to use WHERE IN (...
user avatar
  • 208
1 vote
Accepted

Is it safe to use user defined variables inside stored procedures in MySQL?

User-defined variables are specific to the session where they were set. They don't leak over to other sessions. Each session has its own variables. A variable of the same name in a different session ...
user avatar
  • 9,746
1 vote

SQL Query execution with IN statement

Your scalar string is just that: a string. The compiler doesn't embed your value directly into your query. It creates a placeholder string variable during compilation, then binds the value directly to ...
user avatar
  • 5,643

Only top scored, non community-wiki answers of a minimum length are eligible