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

查看:598
本文介绍了如何在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数据类型语句仅允许更改以下数据类型的列:
字符
数值
二进制

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天全站免登陆