Home Forums SQL Server 2005 SQL Server 2005 General Discussion sp_MSforeachtable group by or distinct count? RE: sp_MSforeachtable group by or distinct count?
Steve Jones - SSC Editor
SSC Guru
Points: 734498
More actions
February 12, 2014 at 10:43 am
#1688504
I'm not completely clear what you're doing. Do you mean you have a _key_out field in every table in the DB?
Are you trying to get
select count( distinct _key_out) from table1