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?

4

1 回答 1

8

使用 @ 符号:

string query= @"SELECT *  
                  FROM product p 
                  JOIN order   o ON p.productID = o.productID";
于 2013-10-24T09:06:20.137 回答