我想知道为什么我会收到以下错误:Column 'tbl.column' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
当 sql 语句看起来像:SELECT tbl.column, MAX(tblOther.columnOtherId) AS otherID FROM (tbl INNER JOIN tblOther ON tbl.columnId = tblOther.columnOtherId) INNER JOIN tblOtherAgain ON tblOther.columnOtherId = tblOtherAgain.columnAgainOtherId WHERE tblOther.columnOtherAgainId = @id
。
当我删除聚合函数MAX时,tblOther.columnOtherId
我没有收到上述错误。那么如何让上面显示的语句正常工作而不会出现显示的错误呢?
DBLibrary:繁琐的.js