首页 新闻 赞助 找找看

sql数据库

0
悬赏园豆:10 [已解决问题] 解决于 2014-05-27 20:32

 using (SqlCommand cmd = new SqlCommand("update UserInfo set ErrTimes=ErrTimes+1 where id=" + id, conn)) 这里面的SQl语句是什么意思

与下面这句sql语句的区别

“update UserInfo set ErrTimes=ErrTimes+1 where id=‘“+id+”’”

太笼统的主页 太笼统 | 初学一级 | 园豆:4
提问于:2014-05-27 19:59
< >
分享
最佳答案
0

update UserInfo set ErrTimes=ErrTimes+1 where id=" + id

意思就是:更新一条数据库记录 Errtimes 字段的值;

“update UserInfo set ErrTimes=ErrTimes+1 where id=‘“+id+”’”

和上面的SQL语句是一样的 !!

收获园豆:10
你啵哥哥哥哥 | 菜鸟二级 |园豆:214 | 2014-05-27 20:10
其他回答(1)
0

这两句没有任何区别,效果都是一样的

Zery | 园豆:6151 (大侠五级) | 2014-05-27 20:11
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册