我试图从两个不同的列中连接 2 个数字,它们是 chain_code 和 shop_code。
我试过这个:
SELECT CONCAT(`shop_code`, `shop_code`) AS myid FROM {table}
但我收到一个错误:
ERROR: operator does not exist: ` integer
LINE 1: SELECT CONCAT(`shop_code`, `shop_code`) AS myid FROM...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
我什至尝试将其转换为字符串,但不能... CONCAT(to_char(chain_code, '999')...) ...
,但它说没有这样的函数称为“to_sting”(在PostgreSQL 文档中找到)