Question

Problems 8.35 - 8.46 (MySQL) Problem 46 Create a trigger named trg_cust_balance that automatically updates the...

Problems 8.35 - 8.46 (MySQL)

Problem 46

Create a trigger named trg_cust_balance that automatically updates the CUSTOMER table’s CUS_BALANCE when a new CHARTER row is added. Use the CHARTER table’s CHAR_TOT_CHG as the update source. (Assume that all charter charges are charged to the customer balance.)?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Query to create trigger:

CREATE OR REPLACE TRIGGER TRG CUST BALANCE

AFTER INSERT ON CHARTER

FOR EACH ROW

BEGIN

UPDATE CUSTOMER

SET CUS BALANCE = CUS BALANCE + NEW.CHAR_TOT_CHG

WHERE CUSTOMER.CUS_CODE = :NEW.CUS_CODE;

END;

/

Add a comment
Know the answer?
Add Answer to:
Problems 8.35 - 8.46 (MySQL) Problem 46 Create a trigger named trg_cust_balance that automatically updates the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • SQL Triggers: ARE VARELA VSA LINE NTS LINE RPHE DATE DU MEADDE Create a trigger named...

    SQL Triggers: ARE VARELA VSA LINE NTS LINE RPHE DATE DU MEADDE Create a trigger named trg prod QOH_on_line_update that will automatically update the product quantity on hand for a product when a corresponding product LINE row is updated. A template has been created for you below for this trigger. Fill in the ... areas with the proper code: CREATE OR REPLACE TRIGGER trg prod_QOH_on_line_update BEFORE UPDATE ON LINE FOR EACH ROW BEGIN UPDATE SET WHERE END; COMMIT;

  • Set-Up · Create a new project in your Eclipse workspace named: Lab13 · In the src...

    Set-Up · Create a new project in your Eclipse workspace named: Lab13 · In the src folder, create a package named: edu.ilstu · Import the following files from T:\it168\Labs\lab13. Note that the .txt file must be in the top level of your project, not inside your src folder. o Student.java o StudentList.java o students.txt Carefully examine the Student.java and StudentList.java files. You are going to complete the StudentList class (updating all necessary Javadoc comments), following the instruction in the code....

  • write a code on .C file Problem Write a C program to implement a banking application...

    write a code on .C file Problem Write a C program to implement a banking application system. The program design must use a main and the below functions only. The program should use the below three text files that contain a set of lines. Sample data of these files are provided with the assessment. Note that you cannot use the library string.h to manipulate string variables. For the file operations and manipulations, you can use only the following functions: fopen(),...

  • Can you please provide the formula for the worksheet also. CASE PROBLEMS Level 1- Analyzing Sales...

    Can you please provide the formula for the worksheet also. CASE PROBLEMS Level 1- Analyzing Sales for Crèmes Ice Cream Judd Hemming is the eastern regional marketing manager for Crèmes Ice Cream. Eac quarter, he completes two separate analyses: an analysis comparing ice cream flavor sale volumes from all regional locations with the same quarter sales volumes from the previou year and an analysis comparing total sales in dollars, including mean, median, mode, and standard deviation, of sales by store....

  • Discussion questions 1. What is the link between internal marketing and service quality in the ai...

    Discussion questions 1. What is the link between internal marketing and service quality in the airline industry? 2. What internal marketing programmes could British Airways put into place to avoid further internal unrest? What potential is there to extend auch programmes to external partners? 3. What challenges may BA face in implementing an internal marketing programme to deliver value to its customers? (1981)ǐn the context ofbank marketing ths theme has bon pururd by other, nashri oriented towards the identification of...

  • Hi, Kindly assist with my project management assignment below using the attached case study Question 1 Update the project charter for the remainder of the project in response to Adams’ memo (lines 241...

    Hi, Kindly assist with my project management assignment below using the attached case study Question 1 Update the project charter for the remainder of the project in response to Adams’ memo (lines 241 through 246). Question 2 Prepare a plan for the remainder of the project in response to Adams’ memo (lines 241 through 246). Your answers to the above will be assessed in terms of the level of communication displayed, the insights and inferences drawn, and your ability to...

  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • Answer critical analysis questions. ISSUES AND APPLICATIONS Private or Public Auto Insurance: What is Best for...

    Answer critical analysis questions. ISSUES AND APPLICATIONS Private or Public Auto Insurance: What is Best for Canada? Concepts Applied: Capitalist, Command, and Mixed Systems; Productive Efficiency, Allocative Efficiency; and Equity t the cost of he codents a How does t In response to public outrage over styrocketing car insurance premiums, the consumers' Association of a completed a comprehensive report on auto insurance rates in Canada September 2003 in presenting the report the association noted that government-owned or public auto insurance...

  • What an Executive Summary Is An executive summary is a specific type of document that does...

    What an Executive Summary Is An executive summary is a specific type of document that does two things: it summarizes a research article, and it offers recommendations as to how information from the article can be used. Some long reports can contain an executive summary section, as indicated in the Pearson handbook. Write a 2 pahe Executive Summary In business contexts, an executive summary is always written for a specific purpose: to explain the information in the article to a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT