|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
sort of simple query i think....description of that table (which is stored in another table) i need something like this. for each (exec sp_tables @table_type="'TABLE'") select count(*) as cnt from TABLE my sql isnt that great.. but what i need to do is get a list of tables, get the record count of each table, find the table name in a table called F9860 that has the "description" of that table and insert that in to a table.. I cant use the F9860 to get a list of table names because it has table names from other databases... i hope thats clear enough. Thanks Justin How do I get a list of SQL Server tables and their row counts?
http://www.aspfaq.com/show.asp?id=2428 AMB Show quote "Justin Rich" wrote: > I need to get the record count for all tables in a DB and get the > description of that table (which is stored in another table) > > i need something like this. > > for each (exec sp_tables @table_type="'TABLE'") > select count(*) as cnt from TABLE > > > my sql isnt that great.. but what i need to do is get a list of tables, get > the record count of each table, find the table name in a table called F9860 > that has the "description" of that table and insert that in to a table.. > > I cant use the F9860 to get a list of table names because it has table names > from other databases... > > i hope thats clear enough. > > Thanks > Justin > > > |
|||||||||||||||||||||||