Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialveronica stupia
94 PointsI keep on getting an SQL error when typing my code ! SELECT * addresses FROM customer_addresses;
I don't understand what is wrong with my query: Select all addresses from the customer_addresses table.
SELECT * addresses FROM customer_addresses;
veronica stupia
94 PointsCara, yes I have tried without the asterisk and I am still getting an invalid error
Cara Marco
2,603 PointsIf you don't mind telling me where to find the challenge, I'll give it a try.
veronica stupia
94 Pointsyes, on the SQL Basics video part 3 challenge task number 3. Thank you Cara!
veronica stupia
94 PointsThank you Cara! I must have added an extra space before since it was not taking it! I was able to get past the problem Thank you!
Gabriel Plackey
11,064 PointsIn case you wanted for info about why your original query didn't work. The all selector (*) cannot be used when also trying to specify and select certain columns. So saying SELECT *(select all columns) and then saying a column to select will throw a syntax error. But because their is not a column named addresses SELECT addresses would throw an invalid column name error. The wording of the challenge doesn't help. They should say select all from customer_addresses. That might be a little more straight forward.
Cara Marco
2,603 PointsAgreed, the wording is tricky. Congrats on solving it Veronica!
1 Answer
Cara Marco
2,603 PointsNot 100% sure I have the right challenge, but I believe this is it:
SELECT * FROM customer_addresses;
Cara Marco
2,603 PointsCara Marco
2,603 PointsHi Veronica,
If "addresses" is the name of the column, have you tried "SELECT addresses FROM customer_addresses;" without the asterisk?