I know this is a weird and strange thing to want to do, but that's what I am trying to achieve.
I have a MySql database and I wish to have a default data entered into a column of a table in my database, the data is in JSON format:
{
"address":"behindthescene",
"state":"Slovakia",
"zip":"56456465",
"country":"Argentina",
"city
Here's the strange part, my Json is incomplete and needs to be enclosed properly but this is how I want it added.
I configured my table column to use this JSON data as the default value instead of having a null value but when it inserts this as the default value it also completes it hence I now have
{
"address":"behindthescene",
"state":"Slovakia",
"zip":"56456465",
"country":"Argentina",
"city":""
}
This is not what I want, I need it to be in the same exact way I entered the data.
Can anyone guide me on how to get my desired results, do not mind the strangeness of my JSON, I have my reason for wanting it that way.
question from:
https://stackoverflow.com/questions/65894109/inserting-a-default-data-into-mysql 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…