Nęste
Forrige
Oversigt
JDBC serie, Planche nr. 8
Kursus Indhold

Put data i databasen

            Statement stmt = con.createStatement();
            stmt.executeUpdate(
                "INSERT INTO COFFEES " + 
                "VALUES ('Colombian', 101, 7.99, 0, 0)");
            stmt.executeUpdate("INSERT INTO COFFEES " +
                "VALUES ('French_Roast', 49, 8.99, 0, 0)");

            stmt.executeUpdate("INSERT INTO COFFEES " +
                "VALUES ('Espresso', 150, 9.99, 0, 0)");
            stmt.executeUpdate("INSERT INTO COFFEES " +
                "VALUES ('Colombian_Decaf', 101, 8.99, 0, 0)");
            stmt.executeUpdate("INSERT INTO COFFEES " +
                "VALUES ('French_Roast_Decaf', 49, 9.99, 0, 0)");


© 1998 BLA*net - Leif E. Andersen, leander@blanet.dk