Is it possible to get multiple values from a subquery?

后端 未结 7 784
無奈伤痛
無奈伤痛 2021-02-06 22:49

Is there any way to have a subquery return multiple columns in oracle db? (I know this specific sql will result in an error, but it sums up what I want pretty well)



        
7条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-06 23:30

    A Subquery in the Select clause, as in your case, is also known as a Scalar Subquery, which means that it's a form of expression. Meaning that it can only return one value.

    I'm afraid you can't return multiple columns from a single Scalar Subquery, no.

    Here's more about Oracle Scalar Subqueries:

    http://docs.oracle.com/cd/B19306_01/server.102/b14200/expressions010.htm#i1033549

提交回复
热议问题