I Have one table i.e discount_details. I have 2 columns are the ID , DiscountTotal. I want to sum the each record line total json object with in the D array (64,10,10 are the 1st record values) . Like here 64,10,10 are the values,need to sum total value as 84 in the select query of MYSQL. I tried below examples but not working. Can please help on this issue.
SELECT JSON_EXTRACT(`DiscountTotal`, '$.D') AS total FROM tablename
source https://stackoverflow.com/questions/76534666/how-to-retrieve-json-object-data-mysql-select-query

No comments:
Post a Comment