[color=red][/color][b]select[/b] [u]distinct[/u] userid,username,password
[color=red]from[/color] t_user
[color=red]where[/color] registDate is like '%2012%'
[color=red]order by[/color] registDate
报:ORA-01791:不是SELECTed 表达式 错误
改为:
[color=red]select[/color] userid,username,password
[color=red]from[/color] (
[color=red]select distinct [/color]userid,username,password
[color=red]from[/color] t_user
)
[color=red]where[/color] 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
[color=red]from[/color] t_user
[color=red]where[/color] registDate is like '%2012%'
[color=red]order by[/color] registDate
报:ORA-01791:不是SELECTed 表达式 错误
改为:
[color=red]select[/color] userid,username,password
[color=red]from[/color] (
[color=red]select distinct [/color]userid,username,password
[color=red]from[/color] t_user
)
[color=red]where[/color] 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