sql - Ampersand insertion Query -
this question has answer here:
i have insert json data in database. unable add ambersand. i'm using below query.
insert sample_table(column1, column2) values('data1', '{ "subject" : "language", "list" : { "test type" : "practical", "mode" : "written & oral", } }' );
i have tried concat option, not working, guide me resolve this.
if ampersand problem, can try like:
insert sample_table(column1, column2) values('data1', '{ "subject" : "language", "list" : { "test type" : "practical", "mode" : "written ' || chr(38) || ' oral", } }' );
that's ascii code ampersand.
Comments
Post a Comment