求解! 新手求学 这个结果不应该是一条数据吗count(*) =3 ,为什么会是多条数据呢?

create or replace function emp_count(v_deptno number)
return number
is
v_count number;
begin
select count(*) into v_count from emp
where deptno = v_deptno;
return v_count;
end;

你这个返回的是一个表;
你要创建的函数应该是要返回一个值对吧(标量函数)
写的时候要改成

select v_count=count(*)   from emp
where deptno = v_deptno;