August S.

asked • 03/02/15

SQL database

Create a trigger named Products_INSERT that sets DateAdded column of the Products table to current date if the value for that column is null. Test this trigger with the following INSERT INTO Products (CategoryID, ProductCode, ProductName, Description, ListPrice, DiscountPercent) VALUES (1, 'G5122', 'Gretsch G5122 Double Cutaway Hollowbody', '', 999.99, 32); Check and make sure the date was inserted with a SELECT statement.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.