I want to create an audit table to track deletes from vendors2. (from earlier in the test)
CREATE TABLE vendors2 (
vend_id char(10),
vend_name char(50)
);
All the deletes will be stored in a table vendorsaudit with the following structure.
Assume this table already exists :
CREATE TABLE vendorsaudit (
vend_id char(10),
vend_name char(50),
datedeleted DATETIME
);
Note: the datedeleted column stores a timestamp when the corresponding row was deleted.
Hint: Use a trigger, and there's more than one way to fill in the datedeleted field.