17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

I’ve gone ahead and filled in the columns as they were in our original Customers table, but we also<br />

need to define our first column as being an identity column. Unfortunately, we don’t appear to have any<br />

way of doing that with the default grid here. To change what items we can define for our table, we need<br />

to right-click in the editing dialog, and select Table View ➪ Modify Custom.<br />

We then get a list of items from which we can choose, shown in Figure 5-7. For now, we’ll just select the<br />

extra item we need — Identity and its associated elements Seed and Increment.<br />

Figure 5-7<br />

Now go back to our editing dialog and select Table View ➪ Custom to view the identity column (see<br />

Figure 5-8), and we’re ready to fill in our table definition.<br />

OK, so <strong>SQL</strong> <strong>Server</strong> can be a bit temperamental on this. If you do not check the box to make this the default,<br />

then <strong>SQL</strong> <strong>Server</strong> will change what your “custom” view looks like, but it will not make the custom view<br />

the active one — the result is that you won’t see the changes you made as you exit the dialog. So, again,<br />

make sure that after changing the view, you right-click and select Table View ➪ MA Custom again. It<br />

should then look like Figure 5-8.<br />

Figure 5-8<br />

Chapter 5: Creating and Altering Tables<br />

149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!