-2
DECLARE
   today       DATE;
   yesterday   DATE;
   traffic     NUMBER;

   CURSOR c1
   IS
      SELECT dt, traffic
        FROM traffic_diff;
BEGIN
   OPEN c1;

   FETCH c1
    INTO today, traffic;

   INSERT
   CLOSE c1;
END;
/

テーブルに値を挿入する方法を提案してください。カーソルを作成する前に。

4

1 に答える 1

0

これを試して :-

DECLARE
   today       DATE;
   yesterday   DATE;
   traffic     NUMBER;

   CURSOR c1
   IS
      SELECT dt, traffic
        FROM traffic_diff;
BEGIN

   insert into traffic_diff(dt,traffic) values(val1,val2);
   commit;

   OPEN c1;

   FETCH c1
    INTO today, traffic;

   CLOSE c1;
END;
/
于 2013-02-23T23:20:55.850 に答える