String str = String. format (@ "insert into AD_TRAINTESTA VALUES ('{0}', '{1}', '{2}', '{3}', '{4 }', '{5}', '{6}', '{7}', '{8}', '{9}', '{10 }', '{11}', '{12}', '{13}', '{14}', '{15 }',
'{16}', '{17}', '{18}', '{19}', '{20}', '{21 }', '{22}', '{23}', '{24}', '{25}', '{26}', '{27 }', '{28}', '{29}', '{30 }')"
, R [0], r [1], r [2], r [3], r [4], r [5], r [6], r [7], r [8], r [9], r [10], r [11], r [12], r [13], r [14], r [15], r [16], r [17], r [18], r [19], r [20], r [21], r [22], r [23], r [24], r [25], r [26], r [27], r [28], r [29], r [30]);
The equals sign is followed by a line in the Code and can be run,
So how to wrap it? This line is too long... (I don't discuss whether the database design is reasonable. Of course it's unreasonable. So I have changed the database, but this problem has never been solved)
Practice is the only criterion for testing truth:
String s = String. Format (@ "safjdlksajkf
Djksaf {0} asdfasfdsa {1} asdfsadf {2} "," 2 ",
"2"
, "2 ");
// [Result]
// S = "safjdlksajkf \ r \ ndjksaf2asdfasfdsa2asdfsadf2"
[Summary]
① The first line of the string cannot be a line break. Otherwise, a line break symbol [\ r \ n] will appear in the result. You must remove it through processing to get the desired result ,,,
② Variables can be wrapped in line, and !!
[The problem has been solved. Please do not reply]