--首先,你是按什么規則拆? 我舉個例子 你要按字段中的逗號拆開,假設字段名叫text
--用charindex和substring這2個函數
select substring(text,1,charindex(',',text)-1) as [before]
,substring(text,charindex(',',text),len(text)) as [after]
from table
--首先,你是按什么規則拆? 我舉個例子 你要按字段中的逗號拆開,假設字段名叫text
--用charindex和substring這2個函數
select substring(text,1,charindex(',',text)-1) as [before]
,substring(text,charindex(',',text),len(text)) as [after]
from table
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。