2
I have the following table structure:
The field metadata
is like text type, but I believe it is actually a JSON.
When I do:
SELECT metadata FROM maxpay.mp_pay_orders;
The result is:
{"idtransactions":122882,"transação":122882}
I need to extract the idtransactions
of this field, in a way that I can consult you with a IN
. Example:
SELECT idtransactions from tabela1 where idtransactions in
(select metadata??? from maxpay.mp_pay_orders)
The Mysql version of the server is 5.6. From the answers, I have seen that it is not JSON, since it is only available from version 5.7.8. But I can’t extract that information from that text in any way.
What language will you work with? I say this because each language has its own way of working with JSON.
– Luis Alberto Batista
Database language do you speak? Why do I need to extract this within the database, not in the application. Mysql
– Layla Comparin
Programming language, type, PHP, Java, Python, C# etc...
– Luis Alberto Batista
As I said, my problem is not in the application. I want to extract information from the database, by the database itself. I don’t even know what language is used in the application.
– Layla Comparin
What version of your Mysql?
– Sorack
My version is 5.6, and I don’t think I can change this version because it’s the same as the server.
– Layla Comparin