-2

例如,

在java文件中,

String[] arrayTest= {"a", "b", "c"};
String strTest = "";
for (String test: arrayTest) {
    strTest = strTest + ", " + test;
}
strTest = strTest.substring(1);

在 xml 文件中,将变量传递给 IN 子句,如:

Where test in (#strTest#)

但它没有用。

4

1 回答 1

-1

Do you mean you are storing this SQL query in an XML file with some other XML data? You could use StringBuilder and a for loop to build up the required SQL query as a String.

于 2012-07-17T22:48:25.327 回答