SQL错误Duplicate column name 'NAME'名字重复应使用别名

SQL错误Duplicate column name 'NAME'名字重复应使用别名

SELECT 
  he.name AS  EMPLOYEE_NAME,
  hda.reason,
  hda.PLANNED_DATE,
  hda.ACTUAL_DATE,
  sup.`POSITION_ID`,
  sp.`NAME` AS position_NAME,
  sp.`ORG_ID`,
  g.`ORG_NAME`
FROM
  hr.hr_dismission_appl hda 
  LEFT JOIN hr.hr_employee he 
    ON he.ID = hda.employee_id 
  LEFT JOIN TEA.`s_user_position` sup 
    ON he.id = sup.`USER_ID` 
  LEFT JOIN TEA.`s_position` sp 
    ON sp.`ID` = sup.`POSITION_ID` 
  LEFT JOIN TEA.S_ORG g
  ON g.`ID`=sp.`ORG_ID`  
  WHERE sp.`ORG_ID`='af4795e0b7cc4740bb2d64e03680be60'

你可能感兴趣的:(JAVA开发,SQL)