---
title: type nclob not supported 问题处理-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 type nclob not supported 问题处理相关的常见问题和使用技巧，帮助您快速解决 type nclob not supported 问题处理的难题。
---
切换语言

- 简体中文
- English

划线反馈

# type nclob not supported 问题处理

更新时间：2026-05-18 09:11

适用版本： V2.1.x、V2.2.x、V3.1.x、V3.2.x 内容类型：Troubleshoot  

本文介绍 type nclob not supported 问题处理。

## 适用版本

OceanBase V2.x、V3.x 版本。

## 问题现象

执行以下 SQL 失败。

```shell
obclient > SELECT concat(c.col_clob,v.col_nvarchar) col_value FROM test_nclob c JOIN test_nvarchar v ON (c.TEST_ID=v.TEST_ID);

```

报错信息如下。

```shell
ErrorCode = 600, SQLState = 0A000, Details = ORA-00600: internal error code, arguments: -4007, type nclob not supported

```

测试 case 如下。

```shell
obclient > CREATE TABLE test_nclob (
        test_id INT,
        col_clob CLOB);

```

```shell
obclinet > CREATE TABLE test_nvarchar (
        test_id INT,
        col_nvarchar NVARCHAR2(1024));

```

```shell
obclinet > SELECT concat(c.col_clob,v.col_nvarchar) col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);

```

- NCLOB 目前不支持。
 - CLOB 类型 := CLOB 类型 || NVARCHAR2 类型 这样的拼串会报下面的错误。

```shell
ORA-00600: internal error code, arguments: -4007, type nclob not supported

```

## 解决方法

NVARCHAR2 转成 CLOB 或 VARCHAR2。

如：

```shell
obclinet > SELECT concat(c.col_clob,to_clob(v.col_nvarchar)) col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);

```

或

```shell
obclient> SELECT c.col_clob || v.col_nvarchar col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);

```

测试结果：

```shell
Server version: OceanBase 3.2.3.3 (r107040032023032910-c59670fcc6f48d0f6d7ba107e85d43efe85e6615) (Built Mar 29 2023 10:50:14)

Copyright (c) 2000, 2020, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

```

```shell
obclient> CREATE TABLE test_nclob (
          test_id INT,
          col_clob CLOB);
Query OK, 0 rows affected (0.03 sec)

```

```shell
obclient> CREATE TABLE test_nvarchar (
          test_id INT,
          col_nvarchar NVARCHAR2(1024));
Query OK, 0 rows affected (0.02 sec)

```

```shell
obclient> SELECT concat(c.col_clob,v.col_nvarchar) col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);
ORA-00600: internal error code, arguments: -4007, type nclob not supported

```

```shell
obclient> SELECT concat(c.col_clob,to_clob(v.col_nvarchar)) col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);
Empty set (0.00 sec)

```

```shell
obclient> SELECT c.col_clob || v.col_nvarchar col_value FROM test_nclob c JOIN test_nvarchar v ON (c.test_id=v.test_id);
Empty set (0.00 sec)

```

另外，如下变形也会报错：

```shell
obclient> SELECT c.col_clob col_value FROM test_nclob c
UNION ALL
SELECT c.col_nvarchar col_value FROM test_nvarchar c;

```

测试结果：

```shell
obclient> SELECT c.col_clob col_value FROM test_nclob c
    -> UNION ALL
    -> SELECT c.col_nvarchar col_value FROM test_nvarchar c;
ORA-01790: expression must have same datatype as corresponding expression

```

改成如下方式则不报错：

```shell
obclient> SELECT to_clob(c.col_clob) col_value FROM test_nclob c
UNION ALL
SELECT to_clob(v.col_nvarchar) col_value FROM test_nvarchar v;

```

或

```shell
obclient> SELECT c.col_clob || '' col_value FROM test_nclob c
UNION ALL
SELECT to_clob(v.col_nvarchar) col_value FROM test_nvarchar v;

```

测试结果：

```shell
obclient> SELECT to_clob(c.col_clob) col_value FROM test_nclob c
          UNION ALL
          SELECT to_clob(v.col_nvarchar) col_value FROM test_nvarchar v;
Empty set (0.01 sec)

```

```shell
obclient> SELECT c.col_clob || '' col_value FROM test_nclob c
          UNION ALL
          SELECT to_clob(v.col_nvarchar) col_value FROM test_nvarchar v;
Empty set (0.00 sec)

```

Previous

[OceanBase ROWID 兼容性介绍](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207703)

Next

[OceanBase 数据库与 Oracle 的 DBMS_CRYPTO.HASH 函数处理 CLOB 字段结果不一致](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207698) ![有帮助](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)[AI](https://www.oceanbase.com/obi) 咨询热线
