Linked Questions

Popular Questions

Fetch data from JSON Block in PostgreSQL

Asked by At

My JSON data is like.

{
    "data":[{ 
        "JoiningDate": "2016-02-05",
        "Empname": "ABCDE","EmpID": "123"
    }]
}

How can I Fetch the value of Empname, can anyone please help me?

Table Structure:

CREATE TABLE emp AS
  SELECT *
  FROM (
   VALUES ('{"data":[ { "JoiningDate": "2016-02-05",
 "Empname": "ABCDE","EmpID": "123"}]}'
::json)
   ) emp(data);

Related Questions