count() on multiple tables in a single query?
|
|
Using mysql v4.0.x on linux.
Given three tables...
CREATE
= UserDept.DeptID
GROUP BY Departments.DeptID, Departments.DeptName
ORDER BY DeptName DESC;
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 12, 2004 6:39 AM
To: Daevid Vincent
Cc: [EMAIL PROTECTED]
Subject: Re: How can I count() on multiple
Using mysql v4.0.x on linux.
Given three tables...
CREATE TABLE Departments (
DeptID int(10) unsigned NOT NULL auto_increment,
DeptName char(30) default NULL,
PRIMARY KEY (DeptID)
)
CREATE TABLE UserDept (
CoreID int(10) unsigned NOT NULL default '0',
DeptID int(10) unsigned NOT NULL