请问这个功能如何用SQL实现:
求STUDENT表中的记录数,并将结果赋值给整型变量count!

解决方案 »

  1.   

    是不是这个select count(1) into  count from STUDENT;
      

  2.   

    select count(*) into cu from student;
      

  3.   

    --SQL:select count(*) into [count] from student建议不要用关键字来定义变量!
      

  4.   

    count是关键字,最好不要用来定义成变量,如果非要,需要加上双引号:
    declare
      "count" number;
    begin
     select count(1) into "count" from dual;
     dbms_output.put_line("count");
    end;