I am making a SQL database for a shop and i am have a lil problem in functions and triggers so i really hope someone here can help me outwhat i need isto create a function [GetDiscount] to get the DISCOUNT_RATE for a particular PROD_CAT from the Discount Table. along with setting an exception when DISCOUNT_RATE is not found for particular PROD_CATto create a Trigger [TrgDisAmount] to read PROD_NAME and Price from Product Table and to calculate the DISCOUNT and AMOUNT of SALES Table fr evert new row with Serial and PCODEbut for the TRIGGERi need to enter the values of PCODE and Serial only, rest should be entered automatically using the trigger
↧