II.4.1. Building a New Table
Before we get started, it's worth pointing out that, for this chapter, we spend most of the time in the SQL Server Management Studio. If you're inclined to use the character-based SQLCMD utility instead, it's no problem. We also show you how to use this utility to create new tables.
To begin, here is how you start the SQL Server Management Studio and prepare it to create new tables:
Launch the SQL Server Management Studio.
Connect to the appropriate SQL Server instance.
Expand the connection's entry in the Object Explorer view.
Expand the Databases folder.
Right-click the Tables folder and choose New Table.
That's all there is to it. You see a dialog box containing a grid that allows you to start entering details about your table. Figure 4-1 shows you how this empty dialog box appears.
Figure II.4-1. Creating a new table in the SQL Server Management Studio.
After this dialog box is in front of you, here's what you do to create your table:
For each column in your table, enter a unique name.
After you've done this naming, the bottom half of the dialog box contains many configurable settings for this column, as shown in Figure 4-2. We spend a fair amount of time examining each of these settings.
Figure II.4-2. Setting column properties in the SQL Server Management Studio.
Pick from one of the data types shown in the drop-down box.
If you're curious about ...