如何通过函数限制select语句中的值

时间:2016-06-16 09:24:15

标签: function plsql restriction

我有这样的查询

select *,  SomeFunction(input=> value) as SomeName
from SomeTable

我想提出像贝洛一样的限制

select *,  SomeFunction(input=> value) as SomeName
from SomeTable
where SomeName != 'this value'

但它给了我吼声错误。

 ORA-00904: "SomeName ": invalid identifier

如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

试试这个。

SELECT A.* FROM
(select *,  SomeFunction(input=> value) as SomeName
from SomeTable)a
where A.SomeName != 'this value'