See below for a picture of what the result should look like, according to
Eclipse's default settings
Todo:
|
public static final String CONNECT_STRING = ("jdbc:oracle:thin:[username]/[password]@hostname:1521:dbId");
private static final String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
public void someMethod() throws Exception
{
String queryToExecute = "select * from example_table;";
Class.forName(MYSQL_DRIVER).newInstance();
Connection conn = DriverManager.getConnection(CONNECT_STRING);
Statement statement = conn.createStatement();
statement.execute(queryToExecute);
ResultSet resultSet = statement.getResultSet();
// some comment needs to go here...
while(resultSet.next())
{
String origin = resultSet.getString("ORIGIN_CD");
}
}