when case compare

piaoling  2011-11-29 15:44:49

SELECT CASE
WHEN `kind`='生活费'
THEN CONCAT("<img src=http://doingthing.com/'",kind,"' />")
WHEN `kind`<> '生活费'
THEN 'jin'
ELSE `kind` <> '生活费'
END AS fangxiang
FROM finance

类别 :  sql(5)  |  浏览(4711)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: