例子:
select Id,FromUserId,ToUserId,[Message],RecordTime,MessageState,
case
when MessageState=1 then '就'
when MessageState=2 then '在'
when MessageState=0 then '中'
end as 状态
from message
as是将修改列名
例子:
select Id,FromUserId,ToUserId,[Message],RecordTime,MessageState,
case
when MessageState=1 then '就'
when MessageState=2 then '在'
when MessageState=0 then '中'
end as 状态
from message
as是将修改列名