SELECT COUNT(DISTINCT [name]) from several tables
I can perform the following SQL Server selection of distinct (or non-repeating names) from a column in one table like so: SELECT COUNT(DISTINCT [Name]) FROM [MyTable] But what if I have more than one table (all these tables contain the name field called [Name]) and I need to know the count of non-repeating names in two or more tables. If I run something like this: SELECT COUNT(DISTINCT [Name]) FROM [MyTable1], [MyTable2], [MyTable3] I get an error, "Ambiguous column name 'Name'". PS. All three tables [MyTable1], [MyTable2], [MyTable3] are a product of a previous selection. After the