各位高手來幫我看看sql的問題吧,謝謝啦,線上等答案啊

zero0412發表於2009-07-10
mySql資料庫
我想把查詢結果中值為null的資料賦值為null.jsp
語句如下:
select distinct i.productId,i.colorId,i.isDeleted,i.isShelves,case c.colorImg when "" then "xxx.jpg" when c.colorImg is null then "null.jpg" when c.colorImg then c.colorImg end as colorImg from t_productitem i left outer join t_productcolor c on (i.colorid=c.colorid) where colorImg is null
可是查出來的該是null的還是null,我就鬱悶了咧.
各位高手幫幫忙哈,謝謝了先.
不行的話還有建表語句.

[該貼被zero0412於2009-07-10 10:37修改過]

相關文章