我想保留已保存到表字段 varchar(32) 中的数据,并将其转换为 Firebird 数据库中的 BLOB。 我正在使用一个软件:IBExpert .... 如果可能,该怎么做?
最佳答案
假设您有一个包含一列 NAME 的表 TEST:
create table test (name varchar(32));
insert into test values('test1');
insert into test values('test2');
insert into test values('test3');
commit;
select * from test;
可以通过以下脚本将列从 varchar 更改为 BLOB:
alter table test add name_blob blob;
update test set name_blob = name;
commit;
alter table test drop name;
alter table test alter column name_blob to name;
commit;
select * from test;
关于sql - 是否可以将 varchar(32) 的字段转换为 Firebird 数据库中的 BLOB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34368282/