CIS 336 STUDY It's Your Life/cis336study.com CIS 336 STUDY It's Your Life/cis336study.com | Page 69

This will work: select unit _ price * 2 as NewPrice from items; Deliverables
• Lab Report( Answer Sheet) containing both the studentcreated SQL command( s) for each exercise, and the output showing the results obtained. Be sure your name is on the file.
LAB STEPS: Complete each of the exercises below.
1. Use an ALTER TABLE statement to update the customers table so that the Primary Key field is an autoincrement field, then create TWO insert statements to test proper operation, using your own first and last name for one( and a name of your choice for the second one), and any data you care to imagine for the remaining fields.
IMPORTANT NOTE: When using a LOCAL copy of MySQL, if you attempt to simply issue the ALTER TABLE command you have composed by itself, you should receive an error similar to the following( try it for yourself!).
ERROR 1833: Cannot change column „ customer _ id ‟: used in a foreign key constraint „ orders _ fk _ customers ‟ of table „ om. orders ‟

This will work: select unit _ price * 2 as NewPrice from items; Deliverables

• Lab Report( Answer Sheet) containing both the studentcreated SQL command( s) for each exercise, and the output showing the results obtained. Be sure your name is on the file.

LAB STEPS: Complete each of the exercises below.

1. Use an ALTER TABLE statement to update the customers table so that the Primary Key field is an autoincrement field, then create TWO insert statements to test proper operation, using your own first and last name for one( and a name of your choice for the second one), and any data you care to imagine for the remaining fields.

IMPORTANT NOTE: When using a LOCAL copy of MySQL, if you attempt to simply issue the ALTER TABLE command you have composed by itself, you should receive an error similar to the following( try it for yourself!).

ERROR 1833: Cannot change column „ customer _ id ‟: used in a foreign key constraint „ orders _ fk _ customers ‟ of table „ om. orders ‟