【发布时间】:2013-05-01 16:10:25
【问题描述】:
我想根据mysql中的列值来命名列别名。这可能吗?
类似的东西;
select
case when answer_type = 'RB' then
answer_type as 'radio'
else
answer_type as 'evrything_else'
end case
from XTable
【问题讨论】:
-
如果你想拥有动态别名,你需要创建动态查询。