Given:
Item table -
"¢ ID, INTEGER: PK
"¢ DESCRIP, VARCHAR(100)
"¢ PRICE, REAL
"¢ QUANTITY< INTEGER
And given the code fragment:
9. try {
10. Connection conn = DriveManager.getConnection(dbURL, username, password);
11. String query = "Select * FROM Item WHERE ID = 110";
12. Statement stmt = conn.createStatement();
13. ResultSet rs = stmt.executeQuery(query);
14. while(rs.next()) {
15. System.out.println("ID: " + rs.getString(1));
16. System.out.println("Description: " + rs.getString(2));
17. System.out.println("Price: " + rs.getString(3));
18. System.out.println(Quantity: " + rs.getString(4));
19. }
20. } catch (SQLException se) {
21. System.out.println("Error");
22. }
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWord exists.
The SQL query is valid.
What is the result?
asdfjhfgjuaDCV
4 months, 3 weeks agosteefaand
5 months, 3 weeks agoiSnover
5 months, 3 weeks agoduydn
10 months, 2 weeks agoWilsonKKerll
2 years, 4 months agomevlt
2 years, 4 months agogriglad
2 years, 5 months agoPontPont
3 years, 1 month agojduarte
3 years, 6 months ago