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

MacKenzie T. Stout
MacKenzie T. Stout
23,972 Points

Parenthesis inside CONCAT function?

I can't find any information about how to add parenthesis inside a CONCAT function.

1 Answer

Steven Parker
Steven Parker
229,967 Points

You didn't mention which course/chapter/video/challenge you were working on, But generally any function has parentheses enclosing its arguments, like this:

CONCAT('Join this string', ' with this one')

Or did you mean to use CONCAT to place parentheses around a string, like this:

CONCAT('(', 'surround me', ')')

I hope I guessed what you were looking for. If not, post a reference to where you are in the (which) course.

MacKenzie T. Stout
MacKenzie T. Stout
23,972 Points

I'm looking to use CONCAT to place parentheses around a string. This question is on Challenge Task 2 of 3 of String Functions on Database Foundations here: https://teamtreehouse.com/library/database-foundations/sql-calculating-aggregating-and-other-functions/string-functions-2

Steven Parker
Steven Parker
229,967 Points

So was my second example enough to get you through that task? You still need another argument, a space, and the alias, but I was betting you could figure it out with a little hint.

Add another comment if you still need help.