On Mon, Mar 6, 2017 at 1:28 AM, Vijaya Sekar <vijayasekar0...@gmail.com> wrote:
> Hello everyone,
>
> I have parent table which holds the primary keys of several child tables.The
> child table are got as a list . Using SQLalchemy ORM, how can I join
> multiple child tables to this parent?
>

Can you give an example of the kind of SQL that you are trying to
produce? I'm not sure what you mean when you say you want to join
multiple child tables. For example, this:

SELECT *
FROM parent p
JOIN child1 c1 ON p.childid = c1.id
JOIN child2 c2 ON p.childid = c2.id

...only makes sense if the same ID exists in both child tables.

Simon

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to