开发者

Using string functions on Alias title using MySQL

I want to name my Alias titles using data from my tables. He开发者_运维技巧re's a totally stupid example to show what I want to do:

SELECT id AS CONCAT('id_', name)

Which would give me the output id_5 => 5. (if ID was 5 in the table)


Sounds like what you're after is a pivot - you mean that for each row in the table, you would end up with a new column, right? If so, then just google mysql pivot (sorry, I'm used to sqlserver)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜