Question: Create a table named ProductsAudit. This table should have all columns of the Products table, except the Description column. Also, it should have an AuditID

Create a table named ProductsAudit. This table should have all columns of the Products table, except the Description column. Also, it should have an AuditID column for its primary key, and the DateAdded column should be changed to DateUpdated. Create a trigger named Products_UPDATE. This trigger should insert the old data about the product into the ProductsAudit table after the row is updated. Then, test this trigger with an appropriate UPDATE statement.

These are the columns of the Products table:

Create a table named ProductsAudit. This table should have all columns of

*should be done in Microsoft SQL Server Mangement

Edbo.Products Columns ProductID (PK, int, not null) o CategorylD (FK, int, null) ProductCode (varchar(10), not null) ProductName (varchar(255), not null) Description (text, not null) istPrice (money, not null DiscountPercent (money, not null) DateAdded (datetime, null) Edbo.Products Columns ProductID (PK, int, not null) o CategorylD (FK, int, null) ProductCode (varchar(10), not null) ProductName (varchar(255), not null) Description (text, not null) istPrice (money, not null DiscountPercent (money, not null) DateAdded (datetime, null)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!