postgres=# select * from sales; id | sales_info ----+---------------------------------------------------------------------------------- 1 | { "customer": "NIJAM", "PRODUCTS": {"product_name": "choclate","total_item": 6}} 2 | { "customer": "ABU", "PRODUCTS": {"product_name": "badam","total_item": 5}} 3 | { "customer": "UMAR", "PRODUCTS": {"product_name": "mobile","total_item": 1}} (3 rows) postgres=# SELECT sales_info ->>'customer' as customer_name,sales_info ->>'PRODUCTS' ->>'product_name' as name_of_product from sales where sales_info ->>'customer'='UMAR'; ERROR: operator does not exist: text ->> unknown LINE 1: ...stomer' as customer_name,sales_info -&
Comments
Post a Comment