This blog posts explains how to add a new line in strings in MySQL Stored Procedures and how to output the result using the MySQL client tool.
Today I was fooling around with some stored procedure making it more fancy and stuff. What I wanted was the OUT variable to contain a newline. Easy of course, using CONCAT:
mysql> SELECT CONCAT('foo','\n','bar');
+--------------------------+
| CONCAT('foo','\n','bar') |
+--------------------------+
| foo
bar |
+--------------------------+
Now, if youconcat strings in a stored procedure, it …
[Read more]