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
Post a Comment