how to use jsonb_each
in from clause
#1700
Answered
by
Angelelz
arashi-dev
asked this question in
Q&A
-
SELECT
jsonb_data.key AS field_name,
jsonb_data.value->>'type' AS type_value
FROM
my_table,
jsonb_each(my_table.my_field) AS jsonb_data; how can I write this query in drizzle? |
Beta Was this translation helpful? Give feedback.
Answered by
Angelelz
Dec 26, 2023
Replies: 1 comment 1 reply
-
Drizzle currently doesn't support comma separated fields in the from clause. The workaround is to write the query to use a join with a subquery or a CTE. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
arashi-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drizzle currently doesn't support comma separated fields in the from clause. The workaround is to write the query to use a join with a subquery or a CTE.