本文介绍了如何计算由id命令的所有星星的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有商店的桌子评级: TableName:房价i have table for store the rating:TableName: RatesID Rating1 42 51 32 43 42 3 我想按ID计算总评分,并使用asp.net-C#I want to count the total rating by id and store the another table using asp.net-C#推荐答案insert into Ratings1(ID, rating )SELECT ID, SUM(rating) as TotalRating FROM Rates ORDER BY IDSELECT ID, SUM(rating) as TotalRating FROM Rates Group BY ID 学习它。 http://www.w3schools.com/sql/sql_insert_into_select.asp [ ^ ] http://www.w3schools.com/sql/sql_groupby.asp [ ^ ] 这篇关于如何计算由id命令的所有星星的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 13:48