Oracle case_when

-- Created on 2010/04/17 by NAN
declare
  -- Local variables here
  i integer;
  v_test VARCHAR2( 10);
begin
  -- Test statements here
  v_test := CASE '6'
  WHEN '1' THEN '1'
  WHEN '2' THEN '2'
  ELSE '3'
  END;
  dbms_output.put_line(v_test);
 
end;

你可能感兴趣的:(oracle)