sql server 將兩列的值合並到另一列


select top 100 t2.FullName, * from Subject,(select id, isnull(first_name,'') +isnull(middle_name,'') + ' '+isnull(last_name,'') as FullName from Subject ) T2 where Subject.id = T2.id and T2.id = 372

--update Subject set Subject.full_name = T2.FullName from Subject,(select id, isnull(first_name,'') +isnull(middle_name,'') + ' '+ isnull(last_name,'') as FullName from Subject ) T2 where Subject.id = T2.id --and T2.id = 372


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM