菜鸟的提问.....
请问有这两个查询,怎么才能把他们的结果合在一起呢??第一个是
SELECT RoleName, DeptName, Count(*) as numberOfSession
FROM Logons AS l, Events AS ev, Employees AS e
WHERE l.session_id=ev.session_id
And e.Name=l.name
And Result_Code=1
And Access_Type='S'
GROUP BY RoleName, DeptName;
第二个是
SELECT RoleName, DeptName, Count(*) as numberOfTable
FROM Logons AS l, Events AS ev, Employees AS e
WHERE l.session_id=ev.session_id
And e.Name=l.name
And Result_Code=1
And Access_Type='S'
GROUP BY RoleName, DeptName,TableName
我要的结果是在一个查询中同时显示numberOfSession和numberOfTable,请问要怎么做呢???