Page 148 - SQL
P. 148

Name     Department

          Ken      Accountant



         SELECT *
         FROM Employee
         ORDER BY CASE Department
                  WHEN 'HR'         THEN 1
                  WHEN 'Accountant' THEN 2
                  ELSE                   3
                  END;


          Name     Department


          Yusuf    HR

          Hillary  HR


          Merry    HR


          Ken      Accountant

          Hasan    IT


          Joe      IT


        Read ORDER BY online: https://riptutorial.com/sql/topic/620/order-by















































        https://riptutorial.com/                                                                             130
   143   144   145   146   147   148   149   150   151   152   153