Question: You are required to create a trigger named update _ total _ amount _ trigger that automatically updates the total _ amount column whenever a
You are required to create a trigger named "updatetotalamounttrigger" that automatically updates the totalamount column whenever a new row is inserted into the table. The trigger should calculate the total amount based on a fixed tax rate of on the order date. For example, if the orderdate is and the inserted row has a totalamount of the trigger should update the totalamount to Write the SQL code to create the "updatetotalamounttrigger" trigger.
Tables Schema as Below:
orders
columnName dataType
orderid INTEGER
orderdate DATE
totalamount REAL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
