【发布时间】:2020-10-01 08:02:09
【问题描述】:
select
a.id,
a.name,
b.group,
a.accountno,
(
select ci.cardno
from taccount ac, tcardinfo ci
where ac.accountno = ci.accountno
) as card_no
from tstudent a, tgroup b
where a.id = b.id
以及如何从(select ci.cardno from taccount ac,tcardinfo ci where ac.accountno = ci.accountno)或任何其他方式中选择多个字段
请注意,这不是两个查询(主查询和子查询)中的关系。子查询值取决于主查询的数据。主查询是多表联结的数据集,子查询也是多表联结的数据集
【问题讨论】:
-
请提供样本数据和期望的结果。为什么不使用正确、明确、标准、可读的
JOIN语法?
标签: sql oracle join select subquery