I have a problem with an update command sql
 sb.Append("UPDATE Users AS u ");
    sb.Append(" SET u.Reputation = (u.Reputation + @Repuation)");
    sb.Append(" INNER JOIN Comments AS c ON c.UsersID=u.UsersID"开发者_如何学Python);
    sb.Append(" WHERE c.CommentsID=@CommentsID");
It tells me that I have an incorrect syntax near the syntax 'AS'
You SQL is incorrect assuming you are using MS SQL Server
It should be
UPDATE u
SET u.Reputation = (u.Reputation + @Reputation)
FROM Users u
INNER JOIN Comments c ON c.UsersID = u.UsersID
WHERE c.CommentsID = @CommentsID
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论