Re: How to find which tables are populated with data
Posted in 1997
Try:
select tabname, nrows from systables where tabid > 99
order by tabname;This will give you the table name and the number of rows,
excluding the system tables.
HTH
Herb
-------------------------------------------------------------------------
Herb Blacker
Cimarron, Inc.
Database Administrator - DOL Job Corps San Marcos, Texas
------------------------------------------------------------------------
On Wed, 19 Nov 1997, David MacAllister wrote:
} Hello
} I need a little help as I'm very new to the DBA game!!!!
}
} Is there a sql statement by which I can select tables on a particular
} database to see if they are populated with data ?
}
} I've tried
} select * from systabnames
} where dbsname = 'testdb'
}
} This has returned the system tables as well as tables on my 'testdbs' but
} does
} not state whether they are populated with data.
}
} Also, I've been dropping stored procedures individually, with similar
} prefix ie
} address_a, address_b, address_c, agent_a, agent_u, agent_s1 etc.
}
} Is there a way that I can select these and then drop them all at the same
} time?
} TIA
}
} David
}