Code example for Statement

Methods: executeUpdate

            Connection con;
            try { 
                con = DriverManager.getConnection(connectionUrl, userName, password);
                // Step 3:  Create a statement where the SQL statement will be provided 
                Statement stmt = con.createStatement();
                stmt.executeUpdate("create table USERS(id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 100) PRIMARY KEY, name varchar(50))");
                stmt.executeUpdate("INSERT INTO users (name) values('Kid')");
                stmt.executeUpdate("INSERT INTO users (name) values('Rob')");
                stmt.executeUpdate("INSERT INTO users (name) values('Dave')");
            } catch (SQLException e) {
                // TODO Auto-generated catch block 
            initialized = true;
    public void testHandleRequest() throws Exception {