Chapter 6. Using MariaDB – Inserting, Updating, and Deleting

Getting data into the tables in our databases, and updating and deleting that data when necessary, is where we will spend a good portion of our time when working with MariaDB. To learn how to do this, we will be covering the following commands in this chapter:

  • Using INSERT
  • Using UPDATE
  • Using DELETE


To put data into our database, we use the INSERT command. The basic syntax is as follows:

INSERT [INTO] <table_name> [(<column_name>[, <column_name>,...])]

As with the CREATE TABLE command in the previous chapter, the parts of the syntax example within the angle brackets (<>) are what we'll replace with our own values. The ...

Get Getting Started with MariaDB - Second Edition now with O’Reilly online learning.

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