我希望获得多个学生的姓名并希望显示它。
期待输入:
total no of students: 2
输入姓名:
jack
thomas
输出:
jack
thomas
尝试查询:
DECLARE
NAME VARCHAR2(30);
total number(10);
BEGIN
DBMS_OUTPUT.PUT_LINE('total no of students');
TOTAL := '&total_peop';
DBMS_OUTPUT.PUT_LINE('enter the names');
FOR I IN 1..TOTAL LOOP
NAME[i] := '&enter_the_name';
DBMS_OUTPUT.PUT_LINE(name[i]);
end loop;
end;