有没有办法在sql中拆分字符串? [英] is there a way to split a string in sql?

查看:33
本文介绍了有没有办法在sql中拆分字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列的值是这样的.

i got a column with a value something like this.

digits
1,2,3
12,4,5
3,45,56

并且我想将行中的值拆分为单独的值,是否有任何简单的方法可以在 SQL 中执行此操作?我正在使用 vb.net.提前致谢

and i want to split the value in the row into individual, is there any simple way to do this in SQL ? im using vb.net. thanks in advance

推荐答案

试试这个:

 SELECT GROUP_CONCAT((digits) SEPARATOR ', ') as digits FROM table                                         

这篇关于有没有办法在sql中拆分字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆