In: Computer Science
Which scenario requires the use of a cursor?
Given a list of product code, display the products whose product code is in the list, and the products have been ordered at least twice. The products must also cost at least 50 dollars.
Given a list of customer id, insert the ids in the list if they are not in the customer table yet.
Given a list of student id, module code, and an assignment score and an exam score for the module, display the student id, module code and final score for the module. Assume that assignment score contributes 30% and exam score contributes 70% to the final score.
None of the above.
Answer :
option A)
Given a list of product code,disply whose product code is in list and the products have ordered at least twice. The products must also cost at least 50 dollars.
CURSOR are the named context's in PL/SQL
there are two types of CURSOR namely,
1)Implicit CURSOR (We can not alter these as these are maintained by oracle it self when ever we are giving a select statement)
2)explicit CURSOR (we can DECLARE OPEN USE CLOSE a CURSOR for our purpose)