d09b5768350a001e1697b33abbd2cc6b
来自「物料管理 物料登记 批量登记:一次性导入多条物料 单条登记:只能录入一条」· 代码 · 共 35 行
TXT
35 行
import java.io.IOException;
import java.sql.SQLException;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import com.qrsx.storage.manager.DBConnection;
public class Delete {
/**
* @param args
* @throws IOException
* @throws SQLException
*/
public static void main(String[] args) throws SQLException {
Connection conn=null;
try{
conn=(Connection) DBConnection.getConnection();
Statement stat=(Statement) conn.createStatement();
String sql="delete * storage where id=1";
stat.executeUpdate(sql);
}catch(IOException e){
e.printStackTrace();
}finally{
if(conn!=null){
try{
conn.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?