Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: join syntax for table.column
12-06-2011, 04:24 AM #1
- Join Date
- Aug 2010
- Thanked 2 Times in 2 Posts
join syntax for table.column
I'm trying to join a couple tables that have the same column name. I want to do something like:
JOIN continents.Name AS continentname ON table1.continents = continents.ID
command denied to user 'username'@'localhost' for table 'Name'
Is this not a possible way of doing my query?
12-06-2011, 05:09 PM #2
- Join Date
- Jan 2011
- Thanked 630 Times in 629 Posts
You really don't say what you want from the two tables. This one produces only the set of records that match in both Table1 and name.
Code:SELECT * FROM Table1 INNER JOIN Name ON table1.continents = Name.continents
12-06-2011, 08:38 PM #3
Why do you think MySQL would lie to you about the error??
That error surely means exactly what it says.
The default user (username@localhost) simply doesn't have permission to access that table in that database.
To find out for sure, just try getting something from that table, without using a JOIN.
You should get the same message.
So now you need to go add username@localhost as an account with permissions to that database and/or table.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.