Android SQLite – insert new record with newline

Yesterday I faced one problem, how to insert new row to SQLite database with newline char.

First I’ve try to use CHAR(13) function (witch is ASCI newline char), but the Android version of SQLite does not have char function (Exception).

Finally I found the way how to do it:

insert into TABLE ('column') values ('First line, ' || x'0A' || 'Second line.');

Special characters || are responsible for concatenation, tells that his is a HEX value, and 0A is hex representation of Line Feed.