Skip to Content
Learn SQL in a Month of Lunches
book

Learn SQL in a Month of Lunches

by Jeff Iannucci
February 2025
Beginner content levelBeginner
304 pages
8h 8m
English
Manning Publications
Content preview from Learn SQL in a Month of Lunches

16 Inserting data

For 15 chapters, we’ve examined ways to read data using the SELECT statement. But all that data we read using the SELECT statement had to get into the tables somehow, so in this chapter, we’ll learn how to insert data.

Throughout this book, we’ve seen that the syntax of SQL is often like the English language. When it comes to inserting rows of data, this similarity holds true because the new keyword we’ll be using is INSERT. Let’s look at some ways to use INSERT to add data to the tables in our database.

16.1 Inserting specific values

The first way to insert data is to use specific values. The main idea to keep in mind is that when we insert data, we’re inserting a new row into an existing table.

Chapter 2 talked about rows, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition

John L. Viescas
SQL Cookbook, 2nd Edition

SQL Cookbook, 2nd Edition

Anthony Molinaro, Robert de Graaf

Publisher Resources

ISBN: 9781633438576Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link