Computer Science, asked by balajijanani921, 11 days ago

Suppose you have a table named data_table that holds data collected from laboratory experiments, and you want to analyze the data from experiment 1.Compute the results and store them in a database table named temp.

Answers

Answered by ppradhisha1
0

Explanation:

suppose you have a table named data_Table

Answered by krishnavenibanavathu
0

Answer:

Explanation:

DECLARE

num1 data_table.n1%TYPE;  -- declare variables

num2 data_table.n2%TYPE;  -- having same types as

num3 data_table.n3%TYPE;  -- database colums

result temp.col1%TYPE;

CURSOR  c1 IS

     SELECT n1,n2,n3 FROM data_table WHERE exper_num=1;

     BEGIN

        OPEN c1;

        LOOP

           FETCH c1 INTO num1,num2,num3;

          EXIT WHEN  c1%NOTFOUND;  --TRUE when FETCH finds no     more rows

          result :-num2/(num1+num3);

         INSERT INTO temp VALUES (result,NULL,NULL);

     END LOOP;

     CLOSE C1;

     COMMIT;

END;

#SPJ2

Similar questions