(a) What is a SQL*Plus script? Why is it a good practice to create a log file while a SQL*Plus script is executed, and how can the log file be created? (b) What can a 'database trigger' be used for? Explain concisely what the code below does.
(c) Assume the following tables:
Order(orderNo, statusCode, customerNo,…)
Item(itemNo, orderNo, price, amount,…)
which capture, among others, the items that are ordered by customers. Explain what the following code is and explain how it works by writing comments against each line of the code:
FUNCTION total_sales (customerNo_in IN orders.customerNo%TYPE,
statusCode_in IN order.statusCode%TYPE:=NULL)
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q8: Write SQL*Plus commands to do the following:
Q9: Assume that the following table is created
Q10: What is a sequence? Write an SQL
Q11: (a) What is a 'table' and what
Q12: (a) What is a named block
Q13: Assuming that a single-row form is
Q14: Oracle database consists of logical and physical
Q15: State the three primary uses of Oracle
Q16: (a)SQL*Plus environment variables are set to
Q17: (a) In PL/SQL what is a Cursor?
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents