关于SQL-SERVER的一点小问题
declare @z int
select @z=count(Eid) from Employee
print @z
go
为什么这样赋值是正确的
declare @b int
select top 1 Department.Dname as '部门名称', b=count(Eid) as '人数' from Department ,Employee
where Department .Did =Employee .Did
group by department.Dname
order by COUNT (Eid) desc
go
这样又是错的了