1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] What is resultant table name from INNER JOIN command in SQLite

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 4, 2024 às 12:22.

  1. Stack

    Stack Membro Participativo

    I'm creating a one-to-many table relationship and I want to access an information from the created table using the INNER JOIN function of SQLite. I just don't know how to go about it. I'm guessing I need to access the resultant table by its name, but I don't know what it is called. Any ideas?


    Lets say I have two tables

    |TABLE_A | |TABLE_B |
    |id |name | |id |foreign_id |subjects |
    |1 |Dave | |1 |1 |math |
    |2 |Steve | |2 |1 |science |
    |3 |Peeve | |3 |3 |english |


    And I use the code

    SELECT u.id, u.name, t.subjects
    FROM TABLE_A u
    INNER JOIN TABLE_B t ON u.id = t.foreign_id


    And this should be the resultant table

    |TABLE_? |
    |id |name |subjects |
    |1 |Dave |math |
    |1 |Dave |science |
    |3 |Peeve |english |


    But what is this table name? How do I access its information?

    Continue reading...

Compartilhe esta Página