Only 3.9% of viewers are subscribing to my channel 😓.
I request you to please give click on Subscribe button.
It really helps me grow 😢.
-- Purpose is to convert table records into JSON (JavaScript Object Notation)
--row_to_json()
select * from actor;
select row_to_json(row(actor_id,first_name)) from actor;
select row_to_json(actor_alias)
from (select actor_id,first_name from actor) actor_alias;
select row_to_json(actor) from actor;
explain
select array_to_json(array_agg(row_to_json(actor_alias)))
from (select * from actor) actor_alias;
Hi...!!!! I'm From Colombia....
ReplyDeleteI need to know how I can convert the data to JSON in a new column of a table through a postgres query