Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: Get a COUNT...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 8843 of 9520
Post > Topic >>

Re: Get a COUNT(*) for all tables in a schema?

by ChrisC <cunningham.cb@[EMAIL PROTECTED] > Apr 30, 2008 at 09:56 AM

--CELKO-- wrote:
> Is there a simple way to get  a COUNT(*) for all tables in a schema in
> DB2 LUW 9.0?

Well, if the tables are mostly static and you have current statistics
OR your tables are very dynamic and you have sufficiently recent
statistics, selecting from the catalog works great:

select tabname, card from syscat.tables where tabschema =
'<schemaName>'

(noting that for very dynamic table sizes, the exact COUNT(*) isn't
often accurate in any case for long).
 




 5 Posts in Topic:
Get a COUNT(*) for all tables in a schema?
--CELKO-- <jcelko212@[  2008-04-30 09:41:45 
Re: Get a COUNT(*) for all tables in a schema?
ChrisC <cunningham.cb@  2008-04-30 09:56:09 
Re: Get a COUNT(*) for all tables in a schema?
Serge Rielau <srielau@  2008-04-30 13:19:46 
Re: Get a COUNT(*) for all tables in a schema?
Lennart <Erik.Lennart.  2008-04-30 12:05:53 
Re: Get a COUNT(*) for all tables in a schema?
bwmiller16@[EMAIL PROTECT  2008-05-01 08:16:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 20:21:08 CST 2008.