0

I am currently formatting my SQL queries like this in C#:

  string query = "SELECT * "+
                   "FROM product p"+
                   "JOIN order o ON p.productID = o.productID";

Is there any alternative ways to achieve the above format without using the + sign?

slugster
  • 49,403
  • 14
  • 95
  • 145
Nick
  • 31
  • 1
  • 5

1 Answers1

8

Use the @ symbol:

string query= @"SELECT *  
                  FROM product p 
                  JOIN order   o ON p.productID = o.productID";
Harminder
  • 2,209
  • 23
  • 20