已SCOTT用户进系统,查询emp表中的这个题怎么写??显示雇员总数,以及获得补助的雇员数???

解决方案 »

  1.   

    楼主找找oracle sql的学习资料吧,这个很基础。
    select count(*) from scott.empselect count(*) from scott.emp where comm is not null
      

  2.   

    用sqlplus登录,select * from scott.emp
      

  3.   

    你太不地道了,看在都是新手的份上答一下了,记得要看书啊
    desc emp;select count(*),sum(case when comm>0 then 1 else 0 end) from emp;
      

  4.   

    select * from scott.emp;
    select count(*) from scott.emp;
    select count(*) from scott.emp where comm is not null;
      

  5.   

    select * from emp where comm is not null;
    我记得emp表中有个人的comm是0的,这个不能算是补助吧?
      

  6.   

    select count(*),sum(case when comm>0 then 1 else 0 end) from emp; 这哥们回答才是最佳的!
      

  7.   


    conn scott/password@orclselect * from empselect count(*) from emp