postgresql中concat的使用方法是什么
在 PostgreSQL 中,可以使用||
操作符或concat()
函数来拼接字符串。
使用||
操作符:
SELECT 'Hello' || ' ' || 'World';
使用concat()
函数:
SELECT concat('Hello', ' ', 'World');
以上两种方式都会将字符串拼接在一起,返回结果为Hello World
。
阅读剩余
THE END
在 PostgreSQL 中,可以使用||
操作符或concat()
函数来拼接字符串。
使用||
操作符:
SELECT 'Hello' || ' ' || 'World';
使用concat()
函数:
SELECT concat('Hello', ' ', 'World');
以上两种方式都会将字符串拼接在一起,返回结果为Hello World
。