大虾进来下语法问题
mysql的select 1 = 1 as a;在oracle中怎样写呢?
[解决办法]
select 1 as a from dual
应该是这样吧
[解决办法]
这个有意义么?
如果是要做判断的话,用case when吧...
select case
when 1=1 then (select 1 from dual)
when 1=2 then (select 2 from dual)
else (select 3 from dual)
end
from dual;
[解决办法]
我猜是这个:
select case when 1 = 1 then 'default' else 'other' end as a from dual
[解决办法]
因为你dual这个表只有一行。其实你也可以建个表,保证他一行。select 1 from 你的表;即可如果select 1 from scott.emp;得到的记录条数就是emp表的行数。
[解决办法]