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

Spaces

I am trying to complete this challenge and it asks for Spaces, but that makes a syntax error, so i DIDN'T put the spaces in. The code worked, but it said that I couldn't pass because i need spaces.

Which challenge is this for? And can you post the query that you're trying?

SELECT name AS Product Name, description AS Product Description FROM products;

or is it

SELECT name AS ProductName, descripton AS ProductDescription FROM products;

and I am 2 things away from the 2nd badge on SQL basics

1 Answer

This is the challenge: https://teamtreehouse.com/library/sql-basics/getting-data-from-a-database/-categorizing-your-output-with-as

In this case, since the aliases have a space in them you have to put quotes around them.

Example: "Product Name"

ProductName would not require quotes around it but then the column name would not be exactly the same as what the challenge wants.