•
•java.sql.Statement s=
con.createStatement();
•java.sql.ResultSet rs;
•rs =
s.executeQuery("Select Title from MOVIES");
•java.sql.ResultSetMetaData md =
rs.getMetaData();
• while (rs.next())
• for (int i = 1; i <= md.getColumnCount();i++)
•
System.out.println(rs.getString(i));
• rs.close();
• } catch (Exception e){
• e.printStackTrace();
• System.out.println("something went wrong
in database land");
• }
•