使用to_char函数别名后,使用group by,报错“标识符无效” select to_char(sysdate,'yyyy') xxx from dual d group by xxx
用to_char(sysdate,'yyyy')作为group by可以,但是为什么别名后不行呢?求原理??? ------解决方案-------------------- select * from (select to_char(sysdate,'yyyy') xxx from dual d) group by xxx