i have used long sql query in jsp.how i write this sql query line by line in jsp ?
sql query
Collapse
X
-
Tags: None
-
If your *real* concern is to have the sql query to be splitted across several lines you can append the portion of queries on each line with the "+" symbol which acts as a concatenation operator.
But as the administrator said, its NOT a good practice to have the SQL inside the JSP and executing it directly as well. Try to read about MVC and follow it.Code:String mySql = "SELECT * FROM <<tableName>>" + "where tableName.colName in (Select matchingColName FROM " + " <<anotherTableName>> ";Comment
Comment