如何在 db2 中将 blob 列类型 clob 转换为 blob [英] How to convert a blob column type clob to blob in db2

查看:41
本文介绍了如何在 db2 中将 blob 列类型 clob 转换为 blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 DB2 中有一个列类型为 CLOB 的表,我想将其转换为 BLOB 类型.我这里的方法是创建一个 BLOB 类型的新列,将所有数据从 CLOB 列复制到 BLOB 列,删除 CLOB 列并重命名 BLOB 列.但是,我不确定如何执行第二步,即将数据从 CLOB 列更新到 BLOB 列.DB2 的什么功能可以让我这样做?提前致谢.

I have a table in DB2 with column type CLOB, I would like to convert this to a BLOB type. My approach here is to create a new column with BLOB type, copy all the data from CLOB column to BLOB column, drop the CLOB column and rename the BLOB column. However, I am not sure how to do the second step i.e. update data from CLOB column to BLOB column. What is the function of DB2 that will let me do this? Thanks in advance.

推荐答案

您不能直接将 Db2 表中的列类型从 CLOB 更改为 BLOB!ALTER TABLE ALTER COLUMN SET DATA TYPE 语句只允许更改以下数据类型的列:特点数字二进制

you can't directly change the column type in your Db2 table from CLOB to BLOB!! The ALTER TABLE ALTER COLUMN SET DATA TYPE statement allows changing columns of the following data types only: Character Numeric Binary

这篇关于如何在 db2 中将 blob 列类型 clob 转换为 blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆