Skip to content

Automatic Table Alias Prefixing in SELECT Queries to Avoid Field Name Conflicts #201

Open
@pfk84

Description

@pfk84

When running a query like:

SELECT a.*, b.* FROM adam a LEFT JOIN ben b ON a.b_id = b.id
or even just
SELECT * FROM adam a LEFT JOIN ben b ON a.b_id = b.id

it would be really helpful if the result field names were automatically prefixed with the table alias, resulting in names like a.id, a.b_id, a.whatever, b.id, b.whatever. Currently, fields with the same name from the b table overwrite those from the a table in the result set, and you have to manually alias each field, which can be quite cumbersome. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions