[Fix] Fixed errors in update sql