On Mon, May 22, 2006 at 03:28:39PM -0400, Andrew Dunstan wrote:
> Jim C. Nasby wrote:
> >
> >BEGIN;
> >-- Don't do the drop right now, because it might take awhile
> >ALTER TABLE tablename RENAME TO delete_tablename;
> >ALTER TABLE temporary_tablename RENAME TO tablename;
> >COMMIT;
> >DROP delete_tablename;
> >
> >
>
> What if there are dependencies? Might be better to have a view, which
> everything depends on, and change the view definition from one table to
> another back and forth.
What dependencies would there be that a view would solve? You can't
define RI on a view AFAIK...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461