Challenge

Project 2

The procedure declares a cursor cur that selects the names of all students from college A using the SELECT statement. It then opens the cursor and uses a loop to fetch each row and store the name of each student in the student_name variable. The loop continues until there are no more rows to fetch. Finally, the cursor is closed.

You can modify the -- Do something with student_name line to perform any operation you want with the fetched data, such as printing the names or storing them in a temporary table.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.