Write an ALTER TABLE statement that adds two new columns to the Products table created in exercise 2.

Add one column for product price that provides for three digits to the left of the decimal point and two to the right. This column should have a default value of 9.99.

Add one column for the date and time that the product was added to the database.

Respuesta :

Answer:

ALTER TABLE Products

ADD Price DECIMAL(5,2) DEFAULT 9.99

ADD TimeAdded DATETIME

Explanation:

ALTER TABLE is the alter table statement with the name of the table being altered as the Products table. Then you ADD the column's name you're adding, which is a decimal with 5 points of precision, 3 to the left of the decimal and 2 to the left, represented by DECIMAL(5,2) and a default value of 9.99. Lastly, the TimeAdded that a product was added can be simply a DATETIME typed column.

ACCESS MORE