方法二:alter
table
student
alter
varchar(20)
DriverManager // static { try { java.sql.DriverManager.registerDriver(new Driver())} catch (SQLException E) { throw new RuntimeException("Can't register driver!")} } 原来,Driver在static块中会注册自己到java.sql.DriverManager。update studentset 属性=属性值
where studentNo='1013'
若只修改一个属性,则上面即可;若修改多个属性,则在set后多个属性以,隔开,依次添加,如:
update student
set 属性=属性值,属性2=属性值2,属性3=属性值3
where studentNo='1013'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)