我有来自 5 个表的复杂选择语句,我想避免其中一个表中具有相同字段值的重复行。
SELECT role_enname
,lu_app_operations.operation_enname
, lu_applications.app_enname
, lu_app_oper_groups.oper_group_enname
FROM app_operation_roles
,roles
,lu_app_operations
,lu_applications
,lu_app_oper_groups
WHERE app_operation_roles.role_id=roles.role_id
AND app_operation_roles.app_operation_id=lu_app_operations.app_operation_id
AND roles.app_id=lu_applications.app_id
AND lu_app_operations.app_oper_group_id=lu_app_oper_groups.app_oper_group_id
AND app_operation_roles.retired =0
AND roles.retired =0
在此查询中,我不显示基于重复的行lu_app_operations.operation_enname