- 中文名
- 连接两个或多个数组
- 外文名
- concat
- 特 点
- 不会改变现有的数组
- 性 质
- 返回一个新的数组
谅晚凝注宙喇弃埋慨虹杠意:
SELECT CONCAT(CAST(int_col AS CHAR), 习旬朵char_col)
oracle的concat函数只能连接一至两个字符,如需要连接多个字符需要嵌套使用,如
例子趋体料:
select concat('11') from dual; ----连接符直接形式展现
返回棕己蜜喇:'11'
select concat('11','22') from dual; ----链接两个字段
返回:'112元凶才2'
select concat(concat('11','22'),'33') from dual; ----链接三个字段
返回:'112233'
select concat(concat('11',null),'33') from dual; ----如果有null则返回null
返回:null
The concat() method is used to join two or more arrays。
使用concat()方法可用来将两个或多个数组结合起来。
This method does not change the existing arrays, it only returns a copy of the joined arrays。
这个方法不会改变现存的数组,它只返回了所结合数组的一份拷贝。
在Sqlserver数据库中,可以使用+代替concat(),+也可以同时连接多个字符串。
所有主要浏览器都支持concat()。
参数 | 描述 |
---|---|
array2,array3, ...,arrayX | 必需。该参数可以是具体的值,也可以是数组对象。可以是任意多个。 |
Here we create two arrays and show them as one using concat():
这里我们使用了concat()将两个数组结合成了一个:
The output of the code above will be:
上面代码的输出结果为:
Here we create three arrays and show them as one using concat():
The output of the code above will be:
上面代码的结果为:
var stringValue = "Hello ";
var result =stringValue.concat("world");
alert(result);//"Hello world"
alert(stringValue);//"Hello "