Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8550613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:59:22+00:00 2026-06-11T13:59:22+00:00

Is there any way to have a subquery return multiple columns in oracle db?

  • 0

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)

select
    a.x,
    ( select b.y, b.z from b where b.v = a.v),
from a

I want a result like this:

a.x | b.y | b.z
---------------
1   | 2   | 3

I know it is possible to solve this problem through joins, but that is not what I am asking for.

My Question is simply if there is any way, to get two or more values out of a subquery? Maybe some workaround using dual? So that there is NO actual join, but a new subquery for each row?

EDIT: This is a principle question. You can solve all these problems using join, I know. You do not need subqueries like this at all (not even for one column). But they are there. So can I use them in that way or is it simply impossible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:59:23+00:00Added an answer on June 11, 2026 at 1:59 pm

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to have this: [one[two]][three] And extract this with a regex?
In an application that has multiple webviews, is there any way to have the
Is there any way to have multiple cells per row in a uitableview using
Is there any way to have a label wordwrap text as needed? I have
Is there any way to have to tabcontrol take the size of the largest
Is there any way to have a default MessageBox.Show() caption? Let says I would
Is there any way to have a template inherit another template? I'm not using
Is there any way to have a code that opens a PDF file in
In WPF, is there any way to have the Text property of a TextBlock
Is there any way I can have a thread branch off into its own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.