What you describe is impossible; there is no way to include a table in a row in another table. Standard practice is to create “parent / child” tables by including the primary key of the parent table as a column in the child table; eg:
PARENT TABLE id | name --------- 1 | Fred 2 | Bob
CHILD TABLE id | parent_id | name --------------------- 1 | 1 | John 2 | 1 | Jim 3 | 2 | Joe 4 | 2 | Jane
This pair of tables would have “John” and “Jim,” like the children of “Fred,” “Joe,” and “Jane,” like the children of “Bob.” You can get a set of all Bob's children (parent id = 2) with the request:
SELECT * FROM child_table WHERE parent_id = 2
source share