Subject | Re: [firebird-support] altering a domain |
---|---|
Author | Martijn Tonies |
Post date | 2005-03-22T07:33:59Z |
> >I have a column associated with a domain defined as 'VARCHAR(200)possible
> >CHARACTER SET NONE' and want to assign it to a domain defined as 'BLOB
> >SUB_TYPE 1 SEGMENT SIZE 100'. Is that allowed, ie will my current data
> >persist? (Is there any way of knowing what is/isn't allowed?).
>
> Data type conversions are not possible through DDL changes, i.e. by ALTER
> DOMAIN or ALTER TABLE ALTER COLUMN TYPE.... So, for example, it's
> to increase the size of a varchar domain or to convert smallint to integerThat's not entirely correct.
> or integer to BigInt, etc., but not to convert data from one type to an
> entirely different type.
If you want to alter the datatype from an Integer to a Varchar, for example,
you can do that, but the varchar needs to be at least 11 characters in
length.
From smallint to a double works fine as well.
Either way, Firebird will return an error when a type cannot be converted
and give you tips on what is supported.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com