Databases Reporting with SQL Working with Text Concatenating Text

Jessica Schteiden
Jessica Schteiden
3,254 Points

Issue with Concatenation Function

Not sure how I am able to incorporate angle brackets around the email alias. Tried a few different things out but am getting stuck.

1 Answer

email isn't an alias. Nor is there a concatenation function in SQLite. Use the concatenation operator. Just make sure the angle brackets and any spaces are enclosed in quotes and email isn't. For example

SELECT '<' || email || '>' AS formatted_email FROM patrons;

will retrieve:


as formatted_email for a record with in the email field.