title: Can i change input parameter value on execute sp_executesql?
body: <p>Anyone knows if it is possible to change an input variable during the execution of sp_executesql?</p>
  
  <p>For example, i want to change @var value to 'bye'</p>
  
  <pre><code>declare @var varchar(10) = 'hello'
  declare @Query nvarchar(max) = 'print @var set @var = ''bye'' print @var'
  
  EXEC SP_EXECUTESQL @Query, N'@var varchar(10)', @var -- Execute Query Statement
  
  print @var
  </code></pre>
  
  <p>The last time I do print @var, I was expecting that it prints 'bye', but printed 'hello'.</p>
  
  <p>Can achive my aim without declaring output variables?</p>
  
  <p>Thanks in advance</p>