?? testexecuteupdatemethod.java
字號:
package com.passedbylove.database.core.test;
import java.sql.SQLException;
import com.passedbylove.database.core.DBOperationAdapter;
public class TestexecuteUpdateMethod {
/** @param argc */
public static void main(String[] argc) {
DBOperationAdapter dbtools=DBOperationAdapter.getInstance();
//有可能引發(fā)事務(wù)處理
try {
int effectedRows=dbtools.executeDelete("update userinfo set password='jdk-tomcat' where userid=1");
System.out.println("已從數(shù)據(jù)庫更新"+effectedRows+"條記錄");
} catch (SQLException e) {
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -