Database Reference
In-Depth Information
The window in SQL Management Studio can be repositioned, so your screen may not look the same as
shown in the figure. You can reset the layout to its default settings at any time using the Window ➤ Reset Windows
Layout menu item.
Note
When you open the table designer initially, there will be no columns specified. Therefore, your first job is to
type in the column name, choose a data type, and then choose whether to allow nulls. Additional settings can
be added as well using the Properties window. For example, if the first column was a customer ID column and
you decided to use the autonumbering feature in SQL Server known as the identity setting, you could use the
Properties window to set the identity column on the table, as shown in Figure 5-20 .
Figure 5-20. Setting column properties
You can easily add a primary key to the table by right-clicking a column and selecting the Set Primary Key
option from the context menu. If you want to create a composite primary key constraint on a table, this is also
easily accomplished. To do so, you must select both columns at once by holding down the Control button as you
click each column. After that, you can right-click to get the context menu and select the Set Primary Key option to
create a composite primary key constraint (Figure 5-21 ).
 
 
Search WWH ::




Custom Search