You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thuantt0101 edited this page Dec 9, 2019
·
1 revision
CASE WHEN AND VARIABLE
DECLARE
V_A VARCHAR(20) ;
V_B VARCHAR(20);
BEGIN
V_A:='1';
CASE
WHEN V_A = '1' THEN V_B:='MOT';
WHEN V_A = '2' THEN V_B:='HAI';
WHEN V_A = '3' THEN V_B:='BA';
ELSE V_B:='';
END CASE;
DBMS_OUTPUT.PUT_LINE(V_B);
END;