MySQL存储过程处理字符串数组

时间:2014-03-03 01:24:30

标签: mysql database stored-procedures stored-functions

数据集:

我有将数据存储到字符串数组中的数据:

+-----+-----------------------------------+
| Id  |  Tag                              |
+-----+-----------------------------------+
| 1   |  ["cafe","bar","tapas"]           |
+-----+-----------------------------------+
| 2   |  ["cafe","bar", "sandwiches"]     |
+-----+-----------------------------------+

我想通过MySQL将ID = 1的标签与ID = 2的标签进行比较 我正在考虑为它创建一个存储过程,但在MySQL中找不到任何文本处理功能。

最终结果:

+-------------------+
| Tag               |
+-------------------+
| "cafe"            |
+-------------------+
| "bar"             |
+-------------------+

非常感谢任何帮助。 提前致谢

0 个答案:

没有答案