So I found myself in need of finding all the tables in a database that had a column with a certain name.  While that was somewhat easy to do I also wanted to know how many rows the tables had, and only see them in the list if they had 1 or more rows.  So by using the sysindexes and sysobjects table, a where statement with a sub-query,  grouping and finally a having statement with a row count greater than 0 (Zero), I finally got what I needed.  I figured I would toss it up here in case it can help anyone else.


Declare @Database_Name VarChar(150) 
Declare @Column_Name VarChar(50)
Set @Database_Name  = 'DatabaseName'
Set @Column_Name = 'ccustno'
select distinct convert(varchar(30),object_name( [Table Name], a.rows
    from sysindexes a
            inner join sysobjects b on =
            inner join INFORMATION_SCHEMA.TABLES c on c.[TABLE_NAME]=convert(varchar(30),object_name(
    where convert(varchar(30),object_name( in
            (SELECT TABLE_NAME
                WHERE COLUMN_NAME =@Column_Name)
    Group by convert(varchar(30),object_name(, a.rows
    Having a.rows > 0