+ 3
Concatenate SQL string java
2 odpowiedzi
+ 2
You should really try using an ORM (Object Relational Mapper). This will save you a ton of time, reduce the number of errors and extra code you right by making it so you don't need to write any SQL by hand.
+ 2
For Java it is recommended to use prepared Statements.
http://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html
They protect you against Sql Injections.
For simple concatenation use
String res = string1+string2;