Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
221,438 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
221,438 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.