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

Databases

We're back on the smartphone, but our phone_book is a mess. There's a phone_book table but there's missing information i

I would like some help here!!!

Select first_name AS "First Name", last_name AS "Last Name",phone AS"Phone number"FROM phone_book; Is not passing !!!!!!!!!!!!!!!!!!!!!!

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Adriano,

Could you link us to the full question and code challenge please? We're a little stuck without it as I'm not sure which fiels or fields the code challenge is asking for! Thanks :)

bummer! you forgot to select all columns !

We're back on the smartphone, but our phone_book is a mess. There's a phone_book table but there's missing information in a couple of the columns. The phone_book has the following columns id, first_name, last_name and phone. Find all contacts in the phone_book where the phone number is missing so we can go and ask them for their number.

2 Answers

Here's the answer

SELECT * FROM phone_book WHERE phone IS NULL;

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Try using the universal selector instead to retrieve all the columns.

You may not even need to alias all the columns

SELECT * FROM phone_book;

how to link to full question and code challenge? it is saying I forgot to select all columns.

I don't know if this question is wrong, because I tried everything!