Oracle中游标2种
1
DECLARE
CURSOR c1 IS
SELECT empno, ename, job FROM emp WHERE ...;
2
select aaa into cursor from ...
你可以写触发器或是写个过程 每天调用就可以了

解决方案 »

  1.   

    Oracle中游标怎么创建使用?
    -->Easily open any Oracle PL/SQL book , you can find the way to declare it ,open it , fetch it etc.还有oracle中有没有调度的功能(象Sql Server中那样),因为我想在一天某个时间创建一个表,怎么创建?谢谢
    --->DBMS_JOB will help you
      

  2.   

    1、type t_sor1 is ref cursor--游标变量
       cursor t_sor2 is
       select * from table_name; --游标集
    2、用dbms_job
    create procedure pro
    as
    str varchar2(50);
    begin
    str:='create table table_name (a varchar2(10))';
    execute immediate str;
    commit;
    end;
    /declare
    jobno number;
     begin
     dbms_job.submit(jobno,'pro;',sysdate,'sysdate+1/(24*60)');
     commit;
    end;
    /
      

  3.   

    创建在declare段中
    cursor cc is select * from tablea;
    cstr cc%rowtype;
    使用在begin end段中
    open cc;
    loop 
     fetch cc into cstr;
    exit when cc%notfound;
    各种操作;
    end loop;
    close cc;