sql server - convert mysql stored procedure to mssql -


I need to use the dynamic order query in mysql and I have successfully obtained the string conjunction in mysql as follows :

set @stmt_text: = concat (choose from 'ABC's order', select sorder );

Prepare stmt_handle with @stmt_text;

Perform stmt_handle;

prepare stmt_handle;

Is there a similar way of converting it to mssql

Any ideas ??

Yes, just run it like this:

  execute (' Select * ACC Order '+ @ Sardar');  

But do not forget that if you receive it via user input (to prevent SQL-injection), then the serial variable must be verified


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -