Subject | Re: [firebird-support] Rename table |
---|---|
Author | Lester Caine |
Post date | 2005-08-23T08:34:10Z |
David Johnson wrote:
we have triggers and stored procedures that may be using the oldtable,
and we have foreign keys that may be linking to it, all of which need to
be managed when changing the name.
Personally I like the security of building a clean new database and
pumping data from the old one. It may take a long time, but it ensures
that there are no problems with any of the data :)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
> According to SQL92 specifications ...The main reason it is not allowed is that unlike the simple SQL92 spec,
>
> create newtable as
> select * from oldtable;
>
> drop oldtable;
>
> But this doesn't seem to work in Firebird. A review of the Interbase
> documentation suggests that there is no direct method. You will need to
> create your new table, migrate your data, and then drop the old table.
we have triggers and stored procedures that may be using the oldtable,
and we have foreign keys that may be linking to it, all of which need to
be managed when changing the name.
Personally I like the security of building a clean new database and
pumping data from the old one. It may take a long time, but it ensures
that there are no problems with any of the data :)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services