Migrate simple large objects
bytecolblobcol
, for example) to
migrate a simple large object to a smart large object. The following
example migrates the BYTE column cat_picture from the catalog table
in the stores7 database to the BLOB field picture in
the advert row type in the alternate catalog table that
is described in Examples for smart-large-object functions:update catalog set advert = ROW ((SELECT cat_picture::blob
FROM stores7:catalog WHERE catalog_num = 10027), pwd
advert.caption)
WHERE catalog_num = 10027
For a description of the stores7 table, see HCL OneDB Guide to SQL: Reference.
You can also use the MODIFY clause of the ALTER TABLE statement to change a TEXT or BYTE column to a CLOB or BLOB column. When you use the MODIFY clause of the ALTER TABLe statement, the database server implicitly casts the old data type to the new data type to create the ClOB or BLOB column.
ALTER TABLE catalog modify cat_descr CLOB,
PUT cat_descr in (sbspc);
For more information about the ALTER TABLE statement, see the HCL OneDB Guide to SQL: Syntax
For more information about casting, see the HCL OneDB Guide to SQL: Syntax and the HCL OneDB Guide to SQL: Tutorial.