MySQL syntax error using LIMIT command with Prepared Statement in Java
问题 I am writing code in Java and I want to take every time I run this code the next line from a MySQL table.The second time I run this code is this. String timh1 = "1"; String timh2 = "2"; PreparedStatement st = null; String sqlGrammes = "SELECT SURNAME ,KATHGORIA, AFM , NAME FROM EMPLOYEE LIMIT ?,? "; try { st = connection.prepareStatement(sqlGrammes); st.setString(1, timh1); st.setString(2, timh2); But it shows me this error : com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have