0
我在MySQL數據庫中的兩個表,我想他們每個人的兩列在不同的表第一個表名比較「oc_product_option_value」有柱:如何比較兩列在MySQL中其中之一的Json
product_option_value_id
20
21
22
23
50
100
和第二臺「oc_cart」已cuolomn
option
{"20":"228","24":"229"}
我想從第一臺比較兩個表並選擇數據,其中第二個表「product_option_value_id」。
我想:
SELECT * FROM oc_product_option_value
WHERE product_option_id IN
(SELECT REPLACE(REPLACE(REPLACE(REPLACE(OPTION,'{',''),'}',''),':',','),'"','')
as `option` FROM `oc_cart`)
,並沒有結果
* columns Structure
"product_option_value_id" is int
"option" is TEXT
對您有幫助嗎? – Delphine