Reputation: 3579
I want to store SQL statements inside SQL db. What datatype would you recommend for that?
At the moment I am using varchar(max), is it OK?
Also I do have a problem, probably because of the brackets, it tells me:
Incorrect syntax near the keyword 'NULL'.
Do you have any example how should I execute query to avoid such error?
Thanks
Upvotes: 1
Views: 109
Reputation: 176916
its better you make use of nvarchar(max)
and escape '
in you sql statement replace by ''
so it doesnt cause any problem for you
Upvotes: 1