![]() |
The Java Developers Almanac 1.4 |
|
e258. Inserting a Row into a Database Table try {
Statement stmt = connection.createStatement();
// Prepare a statement to insert a record
String sql = "INSERT INTO my_table (col_string) VALUES('a string')";
// Execute the insert statement
stmt.executeUpdate(sql);
} catch (SQLException e) {
}
e260. Getting and Inserting Binary Data into an Database Table e261. Updating a Row in a Database Table © 2002 Addison-Wesley. |