我已经用约束创建了一个表来检查是json;
结构:
CREATE TABLE d_jobs (
ID varchar2(500),
jobs varchar2(4000)
constraint ensure_json1 check (jobs is JSON)
);
以及 jobs
列将包含以下值: [{"jobid":"x","status":"done"},{"jobid":"y","status":"done"}]
当我询问时:
select j.jobs.status from d_jobs j;
输出为: ["done","done"]
但我想要输出: ["done"]
--根据列表位置
我试图询问:
select j.jobs[0] from d_jobs j; -- not sure if the given syntax is correct
Error: ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
* Cause:
* Action:
Error at Line: 107 Column: 22
有人能帮忙吗?谢谢您!!
1条答案
按热度按时间gxwragnw1#
这就是你想要的吗?
这将为您提供
status
属性,即: