An Introduction to CRUD
CRUD is an acronym that stands for the four basic functions of persistent storage: Create, Read, Update, and Delete. These four operations are the fundamental building blocks for interacting with data in almost any database system.
When you learn the SQL commands for managing data, you are learning the language of CRUD.
Create (
INSERT): This is the operation for adding new data. In SQL, theINSERTstatement is used to create a new record (or row) in a database table.Read (
SELECT): This is the operation for retrieving or reading data. It's the most common operation you'll perform. TheSELECTstatement in SQL is incredibly powerful, allowing you to fetch, filter, sort, group, and join data.Update (
UPDATE): This is the operation for modifying existing data. TheUPDATEstatement in SQL is used to change the values in one or more existing records in a table.Delete (
DELETE): This is the operation for removing data. TheDELETEstatement in SQL is used to remove one or more records from a table.
Understanding this structure is key to mastering data manipulation. The following pages will break down the specific SQL command for each of these core operations.