Device & User table with "name" column

jaimzj9 years ago

Dear Anton,

Device Table & User table both have a column titled "name".

In a mysql Join Query, wouldn't that be confusing?

What I have done is, SELECT *, device.name as deviceName FROM user_device JOIN device........

Just wanted to share, In-case in the future you plan to make any changes.

Anton Tananaev9 years ago

I don't see any good reason for combining two tables. And even if you do, you can always assign custom name to the result columns.

jaimzj9 years ago

In my case, I join the tables specially user & device into one query to retrieve a list of vehicles assigned to a user and manage them.

As you rightly said, I am so far doing it by assigning custom name to the result columns :)