update table_a set column_a= column_a +4 where column_a<1000
比如select 语句:
select column_a+100 from table_a where column_a<1000
代码如下:
// 加sql.executeUpdate("update classroom set seats='" + (cb.getSeats() + 1) + "' where cno="+cb.getCno()); // 减
sql.executeUpdate("update classroom set seats='" + (cb.getSeats() - 1) + "' where cno="+cb.getCno());
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)