String sql = "SELECT username, password FROM customer " + "WHERE (username = ?) AND (password = ?)";
用dbutils时遇到很无语的报错
java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: “,”附近有语法错误。 Query: SELECT username, password FROM customer WHERE (username = ?) AND (password = ?) Parameters: [admin, admin]
解决方法:在(username = ?) AND (password = ?)在username和password前面加一个空格