Re: isql: How to Make List of Tables & Total Ro
Posted in 1994
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