What is CRUD in SQL? Learn Create, Read, Update & Delete with Examples

If you’re learning SQL or working with databases for the first time, you’ll come across a short but important word: CRUD. It’s not a technical term to be afraid of — it simply explains the four basic things you can do with data in a database.

This article will explain what CRUD means in very simple words. No complex phrases. Just the basics, explained clearly with examples.

What is CRUD?

CRUD stands for:

  • C – Create
  • R – Read
  • U – Update
  • D – Delete

These four actions are the main ways we work with data in a table. Let’s look at each one with easy examples, assuming we have a table called employees.

🏗️ Creating a Database

Before you add tables or data, you first need to create a database.

Here’s a simple SQL query to create a new database:

CREATE DATABASE company_data;

This creates a new database named company_data.

To start using it, you’ll run:

USE company_data;

After that, any tables or data you create will go inside this database.

1. CREATE – Adding Data

Create means adding a new record (or row) to a table. In SQL, we do this using the INSERT INTO command.

Example:

INSERT INTO employees (name, job_title, salary)
VALUES ('Anita Sharma', 'Designer', 50000);

This line adds a new employee named Anita to the employees table. It saves her name, job title, and salary.

Whenever you want to store new data in your table, you use this command.

2. READ – Viewing Data

Read means looking at data that is already in the table. We use the SELECT command for this.

Example 1: View everything

SELECT * FROM employees;

This shows all the rows and columns in the table.

Example 2: View only specific columns

If you only want to see names and job titles, you can do this:

SELECT name, job_title FROM employees;

The SELECT command helps you check, display, or analyze your data. It’s the most used SQL command.

Example 3: View employees with salary over 30,000

SELECT * FROM employees
WHERE salary > 30000;

This shows all the employees whose salary is more than 30,000. The WHERE part helps filter the data.

3. UPDATE – Changing Data

Update means changing something in a record. Maybe someone’s salary changed, or their name was entered wrong. In SQL, we use the UPDATE command.

Example:

UPDATE employees
SET salary = 55000
WHERE name = 'Anita Sharma';

This changes Anita’s salary to 55,000.

⚠️ Be careful: Always use the WHERE clause. Without it, all rows might get updated by mistake.

4. DELETE – Removing Data

Delete means removing a record from the table. You use the DELETE command for this.

DELETE FROM employees
WHERE name = 'Anita Sharma';

This removes Anita from the employees table.

Again, never forget the WHERE part. Without it, all rows will be deleted.

Why is CRUD Important?

These four actions — Create, Read, Update, and Delete — are used in every app or website that stores data.

When you:

  • Add a new user — that’s Create.
  • View product details — that’s Read.
  • Change your email address — that’s Update.
  • Remove an old post — that’s Delete.

Even the apps you use daily (like social media or shopping sites) are built on these same operations.

CRUD helps us organize and manage data. Every database system supports these actions. Whether you’re using MySQL, PostgreSQL, SQLite, or any other system, CRUD works the same way.

Quick Summary Table

ActionSQL CommandWhat It DoesExample
CreateINSERTAdds new dataINSERT INTO employees (…) VALUES (…);
ReadSELECTShows stored dataSELECT * FROM employees;
UpdateUPDATEEdits existing dataUPDATE employees SET … WHERE …;
DeleteDELETERemoves dataDELETE FROM employees WHERE …;

Final Words

Learning CRUD is one of the first steps when working with SQL. It’s the base of everything you do in a database. If you understand these four actions well, you can handle most tasks involving data.

The best way to get better at CRUD is to practice. Try adding a few rows, reading them, updating them, and then deleting them. That’s how you build confidence.

Once CRUD feels easy, you’ll find it simpler to learn more complex SQL topics later.