【问题标题】:How to convert a string to a string list in MySQL?如何在 MySQL 中将字符串转换为字符串列表?
【发布时间】:2023-02-23 11:32:10
【问题描述】:

如何将字符串ids转换为MySQL中的字符串列表? select ids from user

原始SQL和数据如下

 "ids": "admin,demo,mike",

我的预期输出如下:

 "ids": [
            "admin",
            "demo",
            "mike"
        ]

非常感谢您的任何建议。

【问题讨论】:

    标签: mysql


    【解决方案1】:

    其他地方也有人问过类似的问题。

    Convert comma separated strings into list quickly in MySQL

    检查问题的答案,了解如何对 ids 数据做类似的事情。

    【讨论】:

      猜你喜欢
      • 2018-05-29
      • 1970-01-01
      • 2019-10-19
      • 1970-01-01
      • 1970-01-01
      • 2021-12-04
      • 2012-10-23
      • 1970-01-01
      • 2013-12-05
      相关资源
      最近更新 更多