我有一个问题:
select value_text from val_tb where va_id = 26 and record_id = [record_id from above query]
在上面,我需要找到每个:
{{1}}
我可以在第一个查询中进行左连接吗?
答案 0 :(得分:2)
当然可以:
select a.*, b.start_date, b.end_date, c.value_text
from val_tb a
left join record_tb b
on a.record_id = b.record_id
left join val_tb c
on a.record_id = c.record_id
and c.va_id = 26