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:In the following code, what will the database size be increased to the first time it runs out of allocated space?
CREATE DATABASE Customer
  ON
  (NAME = cust_dat,
  FILENAME = 'c: SQL_Data custdat.mdf',
  SIZE = 100MB,
  MAXSIZE = 500MB,
  FILEGROWTH = 20MB)

2:What would happen if you tried to insert the value 123abc into a column defined with a data type of integer?
3:How many primary keys can you have per table?

Exercises

1:Write the code to create a table with the following columns and specifications:

Call the new table "employees2," and add columns for peoples'names as first, middle, and last; allow NULLS for the middle name only.

2:Now write the code to add a four-digit, numbers-only column called emp_number to the table in exercise 1.
..................Content has been hidden....................

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