Page 1 of 1

join with duplicate column nnames in both tables

Posted: Wed Apr 14, 2021 12:22 am
by sputs
Hi,

I am trying to execute this query that runs fine in mysql:

Code: Select all

SELECT states.*,
               countries.name AS name_country 
FROM states 
JOIN countries ON states.country_id = countries.id 
I have figured out that the join statement is causing issues in nuBuilder (but not in mysql). Both tables have a column called id. I suspect this is the issue. I am not able to change the names because this is tied to lots of other apps.

Anyone have any ideas on what I could try to get this working?

Re: join with duplicate column nnames in both tables

Posted: Wed Apr 14, 2021 12:24 am
by kev1n

Re: join with duplicate column nnames in both tables

Posted: Thu Apr 15, 2021 6:11 pm
by sputs
Thank Kevin! Will likely solve it.