Code example for Statement

Methods: execute

0
    } 
 
    public static void fillSimpleTable1(Connection conn) throws SQLException {
        Statement statement = conn.createStatement();
        statement
                .execute("INSERT INTO " + SIMPLE_TABLE1 + " VALUES(1, 10, 20)");
        statement.execute("INSERT INTO " + SIMPLE_TABLE1 + " VALUES(2, 5, 7)");
    } 
 
    public static void fillSimpleTable3(Connection conn) throws SQLException {
        Statement statement = conn.createStatement();
        statement.execute("INSERT INTO " + SIMPLE_TABLE3 + " VALUES(1, 8)");
        statement.execute("INSERT INTO " + SIMPLE_TABLE3 + " VALUES(2, 6)");
        statement.execute("INSERT INTO " + SIMPLE_TABLE3 + " VALUES(3, 4)");
    } 
 
    public static void fillSalesPeopleTable(Connection conn)
            throws SQLException { 
        Statement statement = conn.createStatement();
 
        statement.execute(DatabaseCreator.INSERT_SALESPEOPLE1);