![]() |
![]() |
![]() |
|
![]() |
|
![]() |
java.sql
Code Samples Index These code examples and other materials are subject to Sun Microsystems, Inc. Legal Terms
Updating a Row of Data in a Database TableThis example updates a row in a table called ``mytable''. In particular, for all rows whose column COL_B equals 123, column COL_A is set to ``John Doe''.try { Statement stmt = connection.createStatement(); int numUpdated = stmt.executeUpdate( "UPDATE mytable SET COL_A = 'John Doe' WHERE COL_B = 123"); connection.close(); } catch (SQLException e) { }
|
[ This page was updated: 11-Sep-2000 ] |
|
For more information on Java technology and other software from Sun Microsystems, call: (800) 786-7638 Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first. |
![]() Copyright © 1995-2000 Sun Microsystems, Inc. All Rights Reserved. Terms of Use. Privacy Policy. |