import java.sql.*; public class helloO { public static void main(String args[]) { try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); String url = "jdbc:oracle:thin:@dbserv.dc.umd.edu:1521:SC424"; Connection connection = DriverManager.getConnection( url, "foo", "bar"); Statement statement = connection.createStatement(); statement.executeUpdate( "CREATE TABLE hello (value varchar(50))"); statement.executeUpdate( "INSERT INTO hello VALUES('Hello world!')"); ResultSet resultset = statement.executeQuery( "SELECT * FROM hello " + "WHERE UPPER('foo-bar') LIKE UPPER('FoO-BaR')"); if (resultset != null) // this should not be null.. while(resultset.next()) { System.out.println( resultset.getString(1)); } resultset.close(); statement.close(); connection.close(); } catch(Exception exc) { exc.printStackTrace(); } } }