This is what I had to do for my assigment!! I am just checking if this is correct!! Any help would be nice!! Thank You in Advance!
Create and test the following triggers for the database created in Programming Assignment 6.
1. A trigger that prevents the number of miles on a truck from being decreased.
This what I did for this one!
CREATE TRIGGER TURCK_MILES ON TRUCK
= TRUCK_MILES FROM TURCK
2. A trigger that prevents the Buy Date for truck from being after the current date.
This is what I put!
CREATE TRIGGER TRUCK_BUY_DATE ON TRUCK
=inserted.TRUCK_BUY_DATE FROM INSERTED
3. A trigger that ensures that the Base Code in the Truck table is always in the Base table
CREATE TRIGGER BASE_CODE ON TRUCK