Data Manipulation Language (DML)
Learn about the purpose and importance of DML commands.
We'll cover the following...
In our OnlineStore, if a new customer signs up, a product’s price changes due to a sale, and an old, discontinued item needs to be removed from our catalog. How do we tell the database to make these changes? This is where data manipulation language, or DML, comes into play. It’s the set of tools we use to add, modify, and delete the actual records in our database.
By the end of this lesson, we will be able to:
Understand the purpose and importance of DML commands.
Add new records to tables using the
INSERTstatement.Modify existing records using the
UPDATEstatement.Remove records from tables using the
DELETEstatement.
The INSERT statement
A database isn’t very useful without any data in it. The most fundamental action we can perform is adding new information. Whether it’s a new customer signing up, a new product being added to our inventory, or a new order being placed, the INSERT statement is our gateway to populating our database.
It’s the command that brings our database to life by filling our carefully designed tables with meaningful records.
The INSERT statement is used to add one or more new rows of data into a table. The basic structure of the command requires us to specify the table we’re adding ...