PostgreSQL数据库切割和组合字段函数
Postgresql里面内置了很多的实用函数,下面介绍下组合和切割函数 环境:PostgreSQL 9.1.2 CENTOS 5.7 final 一.组合函数 1.concat a.语法介绍 concat(str "any" [, str "any" [, ...]]) Concatenate all but first arguments with separators. The first parameter is used as a separator. NULL arguments are ignored. b.实际例子: postgres=# create table t_kenyon(id int,name varchar(10),remark text); CREATE TABLE postgres=# insert into t_kenyon values(1,'test','kenyon'),(2,'just','china'),(3,'iam','lovingU'); INSERT 0 3 postgres=# insert into t_kenyon values(4,'test',null); INSERT 0 1 postgres=# insert into t_kenyon values(5,null,'adele'); INSERT 0 1