Question #268510

Write a pl /SQL anonymous block that will prompt the user to enter a particular student number and the displays the students registration information

Expert's answer

DECLARE
stu_number student.studid%type;
stu_name  student.name%type; 
stu_gender student.gender%type; 
stu_course  student.course%typebegin
stu_number := :stu_number;
SELECT name, gender, course INTO stu_name, stu_gender, stu_course FROM student WHERE studid = stu_number;
dbms_output.put_line('Student Name is: '||stu_name||' Gender is: '||stu_gender||'Course is: '||stu_course);
end;
LATEST TUTORIALS
APPROVED BY CLIENTS