Databases Reference
In-Depth Information
The table you created is called Test, and it has two columns: an ID column that is the primary key (clustered
index), and Col1, an nvarchar column. The table is simple, but it's good enough to demonstrate functionality.
You know from earlier in the chapter that the iD column must be a primary key clustered index, or you won't be
able to add data to the table.
Note
4.
Add some data to the table by going back to the command window and typing in the INSERT
statements shown in Figure 5-8 . The great thing about the sqlcmd utility is that you can
enter in as many commands as you want and not execute them until you type GO . Here you
use two INSERT statements that add two records the table you created in the previous step.
Figure 5-8. Inserting rows via sqlcmd
Type GO on line 3> , and press Enter. Although the sqlcmd utility tells you 1 rows affected ,
you can query this new table in SSMS and see the two new rows that were added, as shown
in Figure 5-9 .
5.
Figure 5-9. Viewing results via SSMS
 
 
Search WWH ::




Custom Search