select col1,count(col2) as col7 from --some join operation group by col1 having col7 >= 3 -- replace col7 by count(col2) to make the code work
我的代码导致错误“列名无效”col7’“.为什么会发生这种情况? sql似乎不合逻辑,不允许我在最后一行使用col7.
我正在使用sql Server express 2008