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 trial

Development Tools

Database 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

You may need quotes around Pasan. It's a string, right?

Thanks Christopher! That was all I needed.

EXPLAIN SELECT * FROM users WHERE first_name = 'Pasan'; worked for me

Just 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.