MySQL INNER SELECT with multiple records... help?

Posted on 2007-10-04
Last Modified: 2010-04-21
Ok - this is slightly confusing so bear with me

Imagine a select query - simple, returns one line per record.

Now, add an inner select into that query, that may return multiple records.

Is there any way to get the (possibly) multiple records to show up as additional fields in the resulting set of the main (parent/top/whatever) query rather than duplicating recordsets to account for multiple records returned from the inner query?
Question by:trickyidiot
    LVL 5

    Accepted Solution

    If I understood, you could use group_concat to return several values as a simple string.

    Is my guess even close?
    LVL 6

    Author Closing Comment

    I got past this myself - need to close the question so I'm giving you the points

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now