Question: Write an ALTER TABLE statement that adds two new columns to the Products table created above. Add one column for product price that provides
Write an ALTER TABLE statement that adds two new columns to the Products table created above. 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. Write an ALTER TABLE statement that modifies the Users table created in exercise 2 so the first_name column cannot store NULL values and can store a maximum of 20 characters. Code an UPDATE statement that attempts to insert a NULL value into this column. It should fail due to the NOT NULL constraint. Code another UPDATE statement that attempts to insert a first name that's longer than 20 characters. It should fail due to the length of the column. n 6. 7 X 8 alter table products add column price decimal(5,3) not null constraint (9.99), add Product_Date datetime null;
Step by Step Solution
3.32 Rating (152 Votes )
There are 3 Steps involved in it
Answer For the Products table Add a column for product price ALTER TABLE Products AD... View full answer
Get step-by-step solutions from verified subject matter experts
