You can make your solution more flexible by grabbing the table names from the sysobjects table:
declare @strsql varchar(256)
create table #emptytables (tablename varchar(128), table_rowcount int)
select @strsql='select distinct o.name as TableName, x.rowcnt as Table_RowCount
from sysobjects o
inner join sysindexes x
on o.id = x.id
where x.rowcnt = 0 and
o.type = ''U'''
insert #emptytables (TableName, Table_rowcount) exec (@strsql)
select * from #emptytables
drop table #emptytables
Provide articles on dot net covering asp.net, C#, VB.NET etc what is dot net framework biztalk tutorial visual studio 2010 tutorials net training c# programmer dot net tutorial for beginners dot net for dummies microsoft net courses dot net development learn c# programming c# training courses learn visual studio 2010 c# tutorial video dotnet tutorial dot net developers net consulting company c sharp training net developers c# online training visual studio courses app dot net
Showing posts with label sql server. Show all posts
Showing posts with label sql server. Show all posts
Wednesday, March 25, 2009
Subscribe to:
Posts (Atom)