Drizzle TeamDT
Drizzle Team•2y ago•
4 replies
oscarina

Adding line breaks to sqlite text

Hello, i'm trying to add a text field into my database that can have line breaks.

According to what i've found on SO i can't insert escaped line breaks like "\n".

I'm trying to replace the "\n" with char(10) with sql templates and sql.raw, but nothing that i've tried seems to work.

https://stackoverflow.com/questions/47227684/how-to-insert-a-new-line-n-character-in-sqlite

Is this possible? Any help would be greatly appreciated.
image.png
Stack Overflow
While trying to insert something like:

"Hello\nWorld"
SQLite throws error something like:
Message: unrecognized token: "'Hello";" (also few other errors)
Even though I convert above string ...
How to insert a new line ("\n") character in SQLite?
Was this page helpful?