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!
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
Adrianne Padua7,506 Points
Challenge Task 2 of String Functions
How do you add the parentheses around the username? I've been looking everywhere on the mySQL documentation website and couldn't find anything. :( Help?
I've tried the following:
SELECT CONCAT(first_name, " ", "("username")") AS display_name FROM users;
SELECT CONCAT(first_name, " ", '('username')') AS display_name FROM users;
and even from what I found on some sites like Stack Overflow...
SELECT CONCAT(first_name, " ", [(]username[)]) AS display_name FROM users;
I've been struggling with this challenge for the past 2 days now. Help? :(
MySQL CONCAT() function is used to add two or more strings. You can concat as many string as you like separated by comma.
I haven't done this course so I'm not familiar with this challenge but from what you wrote I guess this would be it.
SELECT CONCAT(first_name, " (", username, ")") AS display_name FROM users;
Please let me know if it did the trick
Hi Adrianne, Sure thing, I'm glad I could be of assistance :)