RE: Deleting from multiple tables
Posted in 2009
You might want to reclaim space and with Madison's and superboer's suggestion that's possible by editing the extent sizes in the XYZ.sql script via sed or something or leaving out the -ss notation relying on smallest default extent sizes and setting IFX_DEF_TABLE_LOCKMODE environment variable or DEF_TABLE_LOCKMODE onconfig parameter to row if you wish.
Zev Berezin
-----Original Message-----
From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Andrew2006
Sent: Wednesday, February 11, 2009 8:58 AM
To: informix-list@iiug.org
Subject: Re: Deleting from multiple tables
Thanks for all the suggestions!
superbo...@t-online.de wrote:
> Madison is right however a bit trigger happy:
>
> dbschema -ss -d XYZ /tmp/XYZ.sql> echo "drop database XYZ; create database XYZ" | dbaccess
> dbaccess XYZ /tmp/XYZ.sql
>
>
>
> Superboer
>
>
> On 11 feb, 13:31, Madison Pruet <mpru...@verizon.net> wrote:
> > Andrew2006 wrote:
> > > I'd like to purge a test database of all data so I can start from
> > > scratch without having to run in "create table" SQL and the stored
> > > procedures.
> >
> > > Is it possible to easily delete all rows from all tables in a
> > > database?
> >
> > > I was wondering if this may be possible to do this in a stored proc
> > > like so:
> >
> > > <pseudocode>
> > > FOR EACH table in systables WHERE table not a system table.
> > > DELETE FROM table;> > > END FOR
> > > </pseudocode>
> >
> > > Does anyone know if this is possible in Informix 10?
> >
> > > Many thanks
> >
> > > Andrew
> >
> > I think that it would be much easier (and quicker) to do something more
> > like...
> >
> > dbschema -ss -d XYZ > /tmp/XYZ.sql> > echo "drop database XYZ" | dbaccess
> > dbaccess sysmaster /tmp/XYZ
> >
> > M.P.
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list