我在Oracle DB中有三个表,如下所示:
培训_日历_hdr
-----------------------------
Training_Id Training_Name
-----------------------------
T1 Physics
T2 Chemistry
T3 Maths
培训_员工_Map
---------------------------
Training_Id Employee_Id
---------------------------
T1 E001
T1 E003
T1 E007
T3 E001
T3 E010
T3 E008
T3 E011
员工_详细信息
---------------------------
Employee_Id Designation
---------------------------
E001 Engineer
E002 Professor
E003 Businessman
E004 Engineer
E005 Govt. Service
E006 Unemployed
E007 Engineer
E008 Govt. Service
E009 Professor
E010 Unemployed
E011 Professor
我需要连接三个表的结果,如下所示:
--------------------------------------------------------------------------------
Training_Name Engineer Businessman Unemployed Professor Govt. Service
--------------------------------------------------------------------------------
Physics 2 1
Maths 1 1 1 1
1条答案
按热度按时间0yg35tkg1#
你可以使用枢轴子句。看看this article。