开发者

Combine row_number() and string column in Postgres

开发者 https://www.devze.com 2022-12-09 14:47 出处:网络
I need to combine to a string column and the result of a row_number() calculation into one column. What I\'ve got is column 1, containing string开发者_如何学Pythons and column 2, containing the row_

I need to combine to a string column and the result of a row_number() calculation into one column.

What I've got is column 1, containing string开发者_如何学Pythons and column 2, containing the row_number() result. Now I to combine both into one.

What's the way of this in Postgres? I figured that a simple + or & does not work out.


Figured it out myself:

table.col || ' ' || row_number()... 
0

精彩评论

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