Chapter 8. Data modification

SQL has a set of statements known as Data Manipulation Language (DML) that deals with data manipulation. Some people think that DML involves only data modification, but it also involves data retrieval. DML includes the statements SELECT, INSERT, UPDATE, DELETE, TRUNCATE, and MERGE. So far I’ve focused on the SELECT statement. This chapter focuses on data-modification statements. In addition to covering standard aspects of data modification, I’ll also cover aspects specific to T-SQL.

To avoid changing existing data in your sample database, most of the examples in this chapter create and populate new tables in the dbo schema in the TSQLV4 database.

Inserting data

T-SQL provides several statements for inserting data ...

Get T-SQL Fundamentals, Third Edition 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.