Workshop

The Workshop provides quiz questions to help you solidify your understanding of the material covered and exercises to provide you with experience in using what you've learned. Try to answer the quiz and exercise questions before checking the answers in Appendix A, "Answers to Quizzes and Exercises," and make sure you understand the answers before continuing to the next lesson.

Quiz

1:What is wrong with the following statement?
DELETE * FROM customer_demo

2:What is wrong with the following statement?
UPDATE customer_demo (
    'John', 'smith', 34)

3:What would happen if you executed the following statement?
DELETE * from customer_demo

4:Will the following SQL statement work?
INSERT INTO customer_demo
SET VALUES = 758
WHERE ITEM = 'CAR'

Exercises

1:Create a table called customers_demo with the following: an identity column called cust_id; fname and lname as required fields; email, which is an optional email address; and cust_new to specify whether the customer is new. The cust_new column should default to 'Y' to specify that the customer is new to the company.
2:Insert the following data into your table.
First NameLast NameEmailNew Customer?
JohnSmith[email protected]Y
JuliePinter N
BillBuckley[email protected]Y
SevenNine[email protected]N

3:Try inserting values with the incorrect data types into the table. Note the errors and then insert values with correct data types into the table.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset