首页 新闻 会员 周边 捐助

entity framework中分组查询生成的sql加常数列(1 AS [C1])的意义是什么?

0
悬赏园豆:50 [已关闭问题] 关闭于 2016-03-25 21:25
 1 SELECT 
 2 1 AS [C1], 
 3 [GroupBy1].[K1] AS [AdAssignId], 
 4 [GroupBy1].[A1] AS [C2]
 5 FROM ( SELECT 
 6     [Extent1].[AdAssignId] AS [K1], 
 7     COUNT(1) AS [A1]
 8     FROM [dbo].[AdAssign] AS [Extent1]
 9     WHERE 0 = (DATEDIFF (day, [Extent1].[AddDate], '2015-07-07'))
10     GROUP BY [Extent1].[AdAssignId]
11 )  AS [GroupBy1]

使用entity framework进行分组查询时,提取生成的sql,发现sql中加入了常数列(1 AS [C1],这样做的意义是什么?

wukaixian的主页 wukaixian | 初学一级 | 园豆:160
提问于:2015-07-07 14:59
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册