oracle中if else只能在存储过程中用吗?
执行
if 3=3 then select sysdate from dual ; end if;
为什么会报错,请各位大神们指点迷津,在下感激不尽!
要实现if else的效果在非存储过程里,可以使用case when语句,如下:select case when 3=3 then (select sysdate from dual) end nowtime from dual;