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
  • 48,492
  • 14
  • 96
  • 143
Nick
  • 31
  • 5

1 Answers1

8

Use the @ symbol:

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