这里面包含了一百多个JAVA源文件

源代码在线查看: e261. updating a row in a database table.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				This example updates a row in a table. 
				    try {
				        Statement stmt = connection.createStatement();
				    
				        // Prepare a statement to update a record
				        String sql = "UPDATE my_table SET col_string='a new string' WHERE col_string = 'a string'";
				    
				        // Execute the insert statement
				        int updateCount = stmt.executeUpdate(sql);
				        // updateCount contains the number of updated rows
				    } catch (SQLException e) {
				    }
				
							

相关资源