0

The problem i'm dealing with is follow :

I have a table students with name and surname. I create a new table Students2, and i want to fill this table with names and surnames from the first table with cursor.

I make the declare of the cursor, the select part, but in the LOOP PART, i don't understand how you fetch the values. For example, if I do:

  FETCH name_surname INTO Students2.name,Students2.surname 

it doesn't work, and I don't know how to fix it.

In name_surname I mention, I Selected the name and surname from the first table.

zowie
  • 51
  • 1
  • 6

1 Answers1

0
"Declare cursor c1 is select * from student2;
Begin
For i in c1 loop
Dbms_output.put_line(i.fname||','||i.lanme);
End loop;
End;"
sa77
  • 3,563
  • 3
  • 24
  • 37