簡體   English   中英

Postgres中JSON查詢中的OR子句

[英]OR clause inside JSON query in Postgres

在Postgres JSONB中,是否可以執行以下操作:

where (
  description ->'Auditor'->'1'->'Internal|External' is not null
)

而不是這個:

where (
  description ->'Auditor'->'1'->'Internal' is not null
  or
  description ->'Auditor'->'1'->'External' is not null
)

您可以檢查jsonb值是否包含任何一組鍵?|

where description->'Auditor'->'1' ?| array ['Internal','External']

相關文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM