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 trialBen Ackles
27,551 PointsDatabase Foundations > Indexing Columns in MySQL (2 of 2)
The instructions are to "Use the EXPLAIN keyword to explain a where query where you see if the 'first_name' equals 'Pasan' in the 'users' tables."
What's wrong with my SQL statement?
EXPLAIN SELECT * FROM users WHERE first_name = Pasan;
3 Answers
Christopher Peters
1,927 PointsYou may need quotes around Pasan. It's a string, right?
Jim Eubanks
3,780 PointsEXPLAIN SELECT * FROM users WHERE first_name = 'Pasan'; worked for me
A X
12,842 PointsJust as a note, I felt like the instructions for this part of the code challenge could've been a lot clearer that the challenge wanted select all vs. select first_name, which is what I interpreted the directions to mean.
Ben Ackles
27,551 PointsBen Ackles
27,551 PointsThanks Christopher! That was all I needed.