Data Modification Archives

Use Data Modification statements to change data in your database tables.

The database modification statements you’ll use the most are:

  • INSERT
  • UPDATE
  • DELETE

You can also combine these into one operation called MERGE!

I would recommend stating out by reading the article Learn how to Add, Remove, or Modify values in a SQL Table.

Then once you have gotten the basics, dig into more detailed articles on INSERT, UPDATE, and DELETE.

Don’t forget about MERGE!  I would highly recommend reading  Introduction to the Merge Statement once you have master the rest.

All the examples for this lesson are based on Microsoft SQL Server Management Studio and the sample databases AdventureWorks and WideWorldImporters.  You can get started using these free tools using my guide Getting Started Using SQL Server

What is the Difference Between Merge and Update?

When modifying one table based on the contents of another it may be tempting to simply use the merge statement, but before you throw away all other forms of modifying data, I think it’s important for you to know the difference between merge and update. What is the Difference Between MERGE and UPDATE? Both the […]

Continue reading

Introduction to the Merge Statement

Introduction to the MERGE Statement and SQL Server Data Modification The MERGE statement is used to make changes in one table based on values matched from anther.   It can be used to combine insert, update, and delete operations into one statement.  In this article, we’ll explore how to use the MERGE statement.  We discuss some […]

Continue reading

Use SQL UPDATE to Query and Modify Data

The SQL UPDATE statement is used to change data within columns of a SQL Server data table.  In this article we’ll explore how to use the UPDATE statement.  We discuss some best practices, limitations, and wrap-up with several examples. This is the third article in a series of articles.  You can start at the beginning […]

Continue reading

SQL INSERT Statement for SQL Server

INSERT Statement

Use the INSERT statement is to add rows to a SQL Server data table.  In this article we explore how to use the INSERT statement.  We discuss best practices, limitations, and wrap-up with several examples. This is the second article in a series of articles.  The first is Introduction to SQL Server Data Modification Statements. […]

Continue reading

Learn how to Add, Remove, or Modify values in a SQL Table

Metamorphisis

In this article we’ll discover data modification statements used to modify data in SQL server using the INSERT, UPDATE, DELETE, and MERGE statement. The SELECT, INSERT, UPDATE, DELETE, and MERGE statement are collectively referred to DML (Data Manipulation Language) statements.  These statements allow you to view and modify data.  We extensively cover SELECT in other […]

Continue reading
>