“Postgres JSON to String” Respostas de código

Postgres JSON to String

SELECT CAST( json_column AS TEXT ) FROM table
or
SELECT json_column::TEXT FROM table
Colorful Constrictor

JSON Array para String no PostgreSQL

	SELECT string_agg(trim(tdata::text, '"'), ', ') from jsonb_array_elements(CAST('[1 , 2]' as jsonb)) tdata
Envious Earthworm

JSON Array para String no PostgreSQL

SELECT 
	ID
	,(
		SELECT string_agg(trim(JsonString::text, '"'), ', ')
		FROM jsonb_array_elements(JsonData->'Name') JsonString
	) AS StringArray
FROM   tbl_TestJsonArray;
Envious Earthworm

JSON COM POSTGRESQL


        
            
        
     SELECT info ->> 'customer' AS customer,
	info -> 'items' ->> 'product' AS product
FROM orders
WHERE CAST ( info -> 'items' ->> 'qty' AS INTEGER) = 2
Alas

Respostas semelhantes a “Postgres JSON to String”

Perguntas semelhantes a “Postgres JSON to String”

Mais respostas relacionadas para “Postgres JSON to String” em Sql

Procure respostas de código populares por idioma

Procurar outros idiomas de código