Working with JSON documents by using SQL

You can store and retrieve JSON data directly by using SQL.

The JSON functions rely on the JSON documents being stored in an internal binary format named BSON (Binary JSON) in Db2.

You can also store and retrieve JSON values in Db2 columns without parsing or indexing on specific fields inside the JSON document. Use a CLOB or VARCHAR column to hold the value and query and update based on another key column in the table.