我只是想将json数据插入到动态列中。
数据如下所示:
"{"Fields": {
"CompanyCode": "1",
"FiscalYear": "2014",
"CalYear": "2014",
"CalPeriod": "1",
"MinPostDate": "2014-01-14T00:00:00",
"MaxPostDate": "2014-01-14T00:00:00",
"CreditDebitInd": "H"
}
}"
查询是这样的:
INSERT INTO jsontest (ID, Text) VALUES(DEFAULT, 'JsonHere');
ID是PK,它是自动递增的ID。 文字是BLOB
答案 0 :(得分:0)
INSERT INTO test VALUES(DEFAULT, '{"Fields": {
"CompanyCode": "E009",
"FiscalYear": "2014",
"CalYear": "2014",
"CalPeriod": "1",
"MinPostDate": "2014-01-14T00:00:00",
"MaxPostDate": "2014-01-14T00:00:00",
"CreditDebitInd": "H"
}
}');
我使用`符号来封装数据。它必须是'符号