16Inserting Sets of Data

“I was brought up to believe that the only thing worth doing was to add to the sum of accurate information in the world.”


To this point, you have learned how to fetch information from your tables in creative ways. In the previous chapter, you learned how to modify existing data by using the UPDATE statement. But how do you put data into your tables to begin with? The data certainly doesn’t appear magically on its own! You’ll learn the answer in this chapter—how to use the INSERT statement to add rows into your tables.

What Is an INSERT?

Most commercial database systems ...

Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.