
在SQL中如何把一列字符串拆分为多列,请高手
1个回答
展开全部
--首先,你是按什么规则拆? 我举个例子 你要按字段中的逗号拆开,假设字段名叫text--用charindex和substring这2个函数 select substring(text,1,charindex(',',text)-1) as [before], substring(text,charindex(',',text),len(text)) as [after] from table
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询