我想执行更新操作,其中一个字段Stu_balace为文本类型(access数据库),现在想更新该字段加30,例如之前stu_balace的值为15,现在累加30,现在的值为45。请问如何写sql语句,在c#里面sql语句都是字符串,如何进行加法运算后,执行update代码如下 :
ststring strSql = "update student set Stu_balance+='";
strSql += 30+ "'";
strSql += "where Stu_grade='" + textBox1.Text.Trim() + "'";
ststring strSql = "update student set Stu_balance+='";
strSql += 30+ "'";
strSql += "where Stu_grade='" + textBox1.Text.Trim() + "'";
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货