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 trialshirley fuakye
1,534 PointsIm not sure how to format concatenation operators
.
1 Answer
Jason Larson
8,361 PointsThe concatenation operator in SQL Playground is two pipes ||
, so to concatenate first_name with last_name, with a space between them, (if they are in a table named people and you want the return field to be called full_name
) you would do:
SELECT first_name || " " || last_name AS full_name FROM people
Put anything that you want to add to the results (like spaces, punctuation, angle brackets, etc.) in quotes. If you're still having trouble, post what you're trying and we can advise you on what needs to be corrected.