Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,
在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#)
但它没有用。
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.