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
mysql的select 1 = 1 as a;在oracle中怎样写呢?
哥~你这个在mysql上是做测试用的。在oracle中,测试就用dual表哦。
比如 select 1+6 from dual;