我的高级技术人员准备了一个视图。查看源脚本,我无法理解该列的label
存在位置,因为两个表都不包含该列。它是作为视图的一部分存在的列吗?
select label labelName
, e.name
, e.country
from entity e
源脚本:
SELECT e.entity_id
, se.screen_id
, s.country_code
,desc_trans translatedValue
, et.language_code
, cp.NAME name
FROM entity e
LEFT OUTER JOIN CONTROL_PREFIX cp
ON e.CONTROL_PREFIX_CODE = cp.CONTROL_PREFIX_CODE
, entity_trans et
, screen s
, screen_entity se
WHERE e.entity_id = et.entity_id
AND e.entity_id = se.entity_id
AND se.screen_id = s.screen_id
AND e.entity_type_code = 'LB'
UNION
SELECT e.entity_id
, se.screen_id
, s.country_code
, field_name labelName
, label labelText
, NULL translatedValue
, l.language_code
, cp.NAME name
FROM entity e
LEFT OUTER JOIN CONTROL_PREFIX cp
ON e.CONTROL_PREFIX_CODE = cp.CONTROL_PREFIX_CODE
, language l
, screen s
, screen_entity se
WHERE l.language_code NOT IN
(
SELECT et1.language_code
FROM entity e1
, entity_trans et1
WHERE e1.entity_id = et1.entity_id
AND e1.entity_id = e.entity_id
AND e1.entity_type_code = 'LB'
)
AND e.entity_type_code = 'LB'
AND s.screen_id = se.screen_id
AND e.entity_id = se.entity_id;