sql查询出的字段赋值另外一个查询语句

PLSQL有没有办法将一个查询语句结果赋值到主查询语句的某个字段上?

Ps:两个表没有直接关联字段

例如:
主查询 : selecr number from class;
查询: select count(1) as oid from class2;

select number,(select count(1) as oid from class2) as temp from class

有帮助的话,请点采纳~

apply,join 都可以,看你的查询逻辑进行组织