I had a project in vb.net that used XML Literals to process large blocks of SQL like so:
Dim SQL As String = Use test
alter table BarFoo alter col
It seems you are trying to mimic the behavior of a verbatim string in C#. These literals start with a leadin @
before the string to let the compiler to not process character escapes. The only character escape you need is to escape a "
with ""
instead.
So your query would look like
string query = @"
Use test
alter table BarFoo alter column CouponName nvarchar(328)
alter table Foo alter column IngredientName nvarchar(328)
alter table Bar alter column IngredientShortDescription nvarchar(328)
alter table FooBar alter column ItemName nvarchar(328)";
This includes the newline characters \n
as well as any leading spacing. In SQL whitespace is just for readability anyway, but it's good to remember that the white space is completely preserved with these literals.