n “); Make sure // Register the JDBC driver Class.forName (“com.mysql.jdbc.Driver”); // Open the connection Connection connection = DriverManager.getConnection (DB_URL, USER, PASS); // Run the SQL query Statement = stmt conn.createStatement (); SQL string; sql means “SELECT ID, first, last, old FROM employees”; ResultSet-Player = stmt.executeQuery (sql); // Retrieve the result from the set data while (rs.next ()) // Get by column name int identity = rs.getInt (“identifier”); int age = rs.getInt (“age”); String first basic = rs.getString (“first”); String last = rs.getString (“last”); // display values Out .println (“ID:” + id + “
“); out.println (“, Age: +” Age + “
“); out.println (“, First:” + + first “
“); out.println (“, Last:” + Last + “
“); out.println (“
Home » Troubleshoot Servlet SQL Syntax Build With Ease