Question: Based on the tables above, write SQL queries for the following requirements: a) Create a stored procedure to count how many projects from the Branch

Based on the tables above, write SQL queries for the following requirements: a) Create a stored procedure to count how many projects from the Branch located in the city of Kuala Lumpur. If there are more than 2 projects, then print 'there are more than 2 projects from Kuala Lumpur. else print 'there are equal or less than 2 projects from Kuala Lumpur. (7 marks) b) Create a stored procedure to insert a new Branch record. In the case where the Branch already exists, update the Branch record with the new details. (6 marks) c) Create an "after update trigger" to ensure that the budget of any project will not exceed 500,000. ( 6 marks) d) Create an "instead of trigger" to prevent any Project records from being deleted. Instead of the delete it should update the status of the project to "Inactive". (6 marles) (Total: 25 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
