selectString = @"SELECT StudentRegistrationInformation.registrationNo,
StudentRegistrationInformation.firstName,
StudentRegistrationInformation.lastName,
StudentPayment.subjectName,
sum(StudentPayment.feeReceived) AS totalReceivedFee
FROM StudentRegistrationInformation
INNER JOIN StudentPayment
ON StudentPayment.registrationNo =
StudentRegistrationInformation.registrationNo";
错误:
列“StudentRegistrationInformation.registrationNo”在选择列表中无效,因为它既不包含在聚合函数中,也不包含在 GROUP BY 子句中。