外键为','(逗号)拼接ID,连接查询外键表ID
生活随笔
收集整理的這篇文章主要介紹了
外键为','(逗号)拼接ID,连接查询外键表ID
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
select distinct pipeId=substring(a.PipeIn,b.number,charindex(',',a.PipeIn+',',b.number)-b.number)
from B_PipeSet_Info a
join master..spt_values b on b.type='P'
where charindex(',',','+a.PipeIn,b.number)=b.number
?
轉載于:https://www.cnblogs.com/mahatmasmile/p/3582136.html
總結
以上是生活随笔為你收集整理的外键为','(逗号)拼接ID,连接查询外键表ID的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux利用PROMPT_COMMAN
- 下一篇: 以团队之名