Chapter 10. Inserting, Updating, and Deleting Data
Microsoft SQL Server 2008 provides you with a number of different ways to insert new data into your databases. Just as a carpenter has many different tools that can achieve the end goal of joining two pieces of wood, SQL Server offers different data insertion tools that are best suited for certain circumstances.
In this chapter, I explain each of those tools and provide advice on how you can determine the appropriate tool for a given situation. I begin by looking at the options available to you when you need to insert small numbers of rows into your database. I then expand the discussion to look at bulk import tools and techniques you can use to retrieve data from remote databases.
Inserting Small Quantities of Data
In many cases, you simply need to add a few new rows to your database, one at a time. Microsoft SQL Server provides you with two basic techniques for achieving this goal: data entry with SQL Server Management Studio's graphic interface and the SQL INSERT
statement.
Understanding simple data entry
The easiest way to insert new data into your database is to use the graphic interface of SQL Server Management Studio (SSMS). SSMS provides a spreadsheet-style data entry format that allows you to simply access the table you'd like to insert data into and begin typing, just as you would in Microsoft Excel.
I use this technique in earlier chapters, so it may already be familiar to you if you've been following along. To insert data ...
Get Microsoft® SQL Server® 2008 For Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.