这样的情况,改如何更新此表中的这条数据?
SqlHelper.ExecuteNonQuery(@"update T_SiteConfiguration set select count(1) SiteName = @SiteName ,Keywords = @Keywords,Description = @Description ,PageSize = @PageSize,SiteDomain = @SiteDomain,ICP=@ICP,Version = @Version,Copyright = @Copyright,Tongji=@Tongji",
这样的数据库语句更新不了。
update T_SiteConfiguration set SiteName = @SiteName ,Keywords = @Keywords,Description = @Description ,PageSize = @PageSize,SiteDomain = @SiteDomain,ICP=@ICP,Version = @Version,Copyright = @Copyright,Tongji=@Tongji
set select count(1) 把select count(1)去掉应该可以
去掉 select count(1)
还有一个问题,这个语句都没有WHERE条件,这是一个常见的错误,如果不带WHERE,则会更新整个表