SQL 中as定义的别名在min函数中能作为列名用吗,该怎么用

来源:百度知道 编辑:UC知道 时间:2024/07/04 18:57:26

不太明白你想干啥?
如果是子查询中用的AS列,那么父查询中必须要用别名。
select a,min(b) as b from table1
select a,min(b1) as b from (select a,b as b1 from table2) as table1

select min(别名) from (select t.列名 as 别名 from 表名 t)

应该min(实际列名)吧

这个肯定可以咯
用AS定义后字段的别名 可以像原表中的字段一样
---min(改后的字段名)