所以我有一些看起来像这样的数据;
Column A | Column B
__________|__________
Chicken | 2
Duck | 8
Cat | 3
我如何使它看起来像这样?
Column C |
____________|
Chicken = 2 |
Duck = 8 |
Cat = 3 |
答案 0 :(得分:2)
尝试以下连接方式
SELECT clumnA || ' = '|| columnb AS ColumnC
FROM yourTable;
答案 1 :(得分:0)
您要使用concat函数
https://www.postgresql.org/docs/current/functions-string.html#id-1.5.8.9.7.2.2.4.1.1
SELECT CONCAT("Column A", ' = ', "Column B") AS "Column C" FROM [table];