比如我有这样的查询, select col1,col2,col3 from table group by col1,col2,col3 这样没问题,
但是我有这样的查询 select col1, (select ... ...) as col2, (select .. ... )as col3 group by col1,col2,col3用别名分组不行,就说别名不可识别 ,求救
但是我有这样的查询 select col1, (select ... ...) as col2, (select .. ... )as col3 group by col1,col2,col3用别名分组不行,就说别名不可识别 ,求救
解决方案 »
- datatable 導入到Excel_跪求
- 请教个菜鸟问题
- 轮播
- .net开发网站时,遇到一个问题!
- Dropdownlist控件绑定数据问题
- TextBox1.Text = max_id.toString(10);编译器错误信息: CS0117: “int”并不包含对“toString”的定义
- 在脚本中如何与数据库交互?
- 服务器sql2000数据库连接不上?
- 小弟碰见的问题,各位指教~~
- js调webservice的问题!请进
- 谈谈你用的最爽的验证方式
- <script language=javascript defer>alert('" + TxtMessage + "')</script>问题
declare @t table(
name varchar(10)
)
insert into @t select '1'
insert into @t select '2'
insert into @t select '3'
insert into @t select '4'select * from @t
select name from @t group by name
--错误的用别名分组
--select name n from @t group by n
--使用别名分组
select * from (select name n from @t) t group by n