Complete the code to create a table with a JSONB column.
CREATE TABLE data_store (info [1]);The JSONB type stores JSON data in a binary format, allowing efficient querying and indexing.
Complete the query to select rows where the JSONB column contains a key 'name'.
SELECT * FROM data_store WHERE info [1] 'name';
@> instead of key existence operator.The ? operator checks if the JSONB column contains the specified key.
Fix the error in the query to extract the text value of key 'age' from a JSONB column.
SELECT info->>[1] FROM data_store;The key name must be a string literal in single quotes inside the operator ->>.
Fill both blanks to create a JSONB object with keys 'name' and 'age'.
SELECT jsonb_build_object([1], 'Alice', [2], 30);
Keys in JSONB objects must be string literals, so use single quotes around 'name' and 'age'.
Fill all three blanks to update the JSONB column by adding a new key 'city' with value 'Paris'.
UPDATE data_store SET info = info [1] jsonb_build_object([2], [3]);
-> instead of ||.The || operator merges JSONB objects. Use string literals for key and value.