Subject | Re: [firebird-support] Change Datatype (2) |
---|---|
Author | Martijn Tonies |
Post date | 2004-10-22T15:11:01Z |
> >Because nobody answered to Subject 'Change Datatype', i will ask in aDatabase Workbench cannot do that - and has good reasons
> >different way.
> >
> >I use following statements for converting a primary key with smallint
> >datatype to an integer datatype:
> >
> >
> >
> You can do that in the easy way with IBexpert Personal edition (is free).
> Dont konw if Database Workbech also do it.
for it.
Firebird disallows this change because of the automagically
created indices for PKs. FKs can point to a PK.
Simply changing the underlying datatype is not a particular
good idea.
The best thing you can do is:
- drop any dependent FKs
- drop the PK
- change the datatype
- recreate the PK
- recreate the FKs
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com