Adding a newline (i.e. 'carriage-return' or 'line-break') in MySQL statements
There was suprisingly little information on how to insert a newline character into a MySQL script. Here is what I found:
SET @newline=CHAR(10);
Set a user variable for the (unix) newline character. You can then use it like so:
select @newline;
(returns a newline)
select concat('something,', @newline, 'something', @newline, 'darkside...') as emperor_dialogue;
something,
something,
darkside...
Enjoy!
Posted by Aaron Newton