[/color]select distinct userid,username,password
[color=red]from t_user
where registDate is like '%2012%'
order by registDate
报:ORA-01791:不是SELECTed 表达式 错误
改为:
select userid,username,password
from (
select distinct userid,username,password
from t_user
)
where rigistDate is like '%2012%'
order by[color=red][/color] rigistDate
报 ORA-00904:'RIGISTDATE' 无效的标示符
原因:查出的列中没有:rigistDate
加入后即可
如下
select userid ,username,password,rigistDate
from(
select userid,username,password,rigistDAte
from t_user
)
where rigistDate like '%2012%'
order by rigistDate
不是SELECTed表达式
猜你喜欢
转载自wsm543986221.iteye.com/blog/1856083
今日推荐
周排行