Multiple COUNT queries

A

Anonymous

Guest
I'm trying to count the distinct fields within two tables, but my script keeps timing out. Any ideas:

SELECT COUNT(DISTINCT table1.fieldname) AS table1, COUNT (DISTINCT table2.fieldname) as table2 FROM table1, table2

Ideally I want one total but two would do. Any ideas?

Thanks in advance
 
SELECT DISTINCT COUNT(table1.fieldname) AS table1, DISTINCT COUNT (table2.fieldname) as table2 FROM table1, table2

hows that?
 
I want it to count distinct fields, this will not do that.

Thanks anyhoo
 
Back
Top