---
title: github-fill
description: 分布式数据库OceanBase 社区版文档中心，提供关于CONCAT_WS的相关内容，方便用户更好的应用分布式数据库OceanBaseOceanBase 数据库
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会") 文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 3.1.5 社区版

# CONCAT_WS

更新时间：2026-05-31 19:18:46

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V3.1.5/zh-CN/1400.developer-guide/700.sql-reference/300.functions/200.single-row-functions/200.string-functions/700.concat_ws.md)  

## 声明

```sql
CONCAT_WS(separator, str1, .., strN)

```

## 说明

把多个字符串连接成一个字符串，相邻字符串间使用 `separator` 分隔。参数中包含 `NULL` 时，将忽略 `NULL`。

该函数不会忽略空字符串。

## 示例

```sql
obclient> SELECT
     CONCAT_WS('_', 'First', 'Second'),
     CONCAT_WS('_', 'First', NULL, 'Second')
     \G
*************************** 1. row ***************************
      CONCAT_WS('_', 'First', 'Second'): First_Second
CONCAT_WS('_', 'First', NULL, 'Second'): First_Second
1 row in set

```

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
