Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Shyam Davuburu — — source: Informix-list mailing list archive (1991-1998)
In article KLx@eskimo.com, gshep@eskimo.com (Greg Sheppard) writes:
>
> We just got Informix 4.1 Online a week ago so this is definitely a
> newbie question: How can I make a list of all the tables in a certain
> database and each table's total rows? Can I do it with one sql
> statement? Would like output like:
>
> table1 <total rows>
> table2 <total rows>
> etc. Part of the motivation for listing this info is we have a db with
> 134 tables...I tried to load the tables with some ascii delimited
> files...and after an unknown number of successful loads it bombed with
> improper number of columns...need to isolate which table is at fault, so
> I can then isolate where "I" went astray.
>
You can do it in one select. Try to select records from system table 'systables'
This maintains the info of each table like nrows, rowsize etc. But before doing the
select run update statistics on your database, so that all the system tables will be updated to the current info.
The select is :
select tabname, nrows from systables.
Bye
Shyam
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.