Sql Server中Order By列明不明确
时间:2020-01-10 13:36:11
收藏:0
阅读:171
在sql sever中执行这段语句时提示CreateDateTime列明不明确
缘由:执行顺序:(1) select CreateDateTime,* from Lambor_Users.dbo.MasterProfitLossSettleList
查出结果集之后,再次执行:
(2)order by CreateDateTime
由此可看出:(1)执行结果集中产生了两个CreateDateTime列段,则导致order by不明确
解决方案:添加别名
原文:https://www.cnblogs.com/yxcn/p/12175522.html
评论(0)