Topic: Scalar request in CASE
Children all greetings!
I read to dock, section Scalar Subquery Expressions . Here it is written:
A scalar subquery expression is a subquery that returns exactly one column value from one row.
You can use a scalar subquery expression in most syntax that calls for an expression (expr). However, scalar subqueries are not valid expressions in the following places:
In WHEN conditions of CASE expressions
If I correctly translated, - scalar subqueries cannot be used as conditions in When for CASE expressions.
--- The first variant select case when 1 in (select 1 from dual) then ' Hello Oracle! ' end from dual --- The second variant select case when (select 1 from dual) = 1 then ' Hello Oracle! ' end from dual --- The third select case when 1 in (select 1 from dual) then (select ' Hello Oracle! ' from dual) end from dual
All three request successfully fulfilled! - why they fulfilled a question? What not so I translated in dock?