※ 當Nickname為空或為DBNull時, 內容改成抓欄位Name
SELECT COALESCE(NULLIF(Nickname ,''), Name) as Name2 from Employee
※ 如果Nickname為ntext時
SELECT COALESCE(NULLIF(CONVERT(NVarChar(30), Nickname),''), Name) as Name2 from Employee
*Nickname: | |
E-mail: | |
Blog URL: | |
#Nickname#
2015/1/5 下午 06:22:55
#CommentContent#
|
|
*請輸入驗證碼: | 看不懂,換張圖 |