Monday, November 30, 2015

Oracle CASE Practice


SELECT CODE, CASE(NAME_EN) 
WHEN 'Teacher' then 'Head Teacher' 
WHEN 'Maulna' then 'Head Maulana' 
ELSE NAME_EN
END  TITLE_EGLISH
FROM IMS_SETUP_DESIGNATION_TO;

Here  NAME_EN is a column of  IMS_SETUP_DESIGNATION_TO table but it also may be a variable.

Add Choice