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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -