DEV Community

Mohamed El Laithy
Mohamed El Laithy

Posted on

Summary of All SQL Commands In One Animated Diagram

SQL is the language that powers data management, and mastering its core commands is essential for anyone working with databases. Let’s break them down into five main categories:

DQL (Data Query Language): Retrieve data from databases using commands like:

  • SELECT — Extract specific data from tables.
  • WHERE — Filter records based on conditions.
  • JOIN — Combine rows from multiple tables.

DML (Data Manipulation Language): Modify data with commands such as:

  • INSERT — Add new records.
  • UPDATE — Modify existing records.
  • DELETE — Remove records.

DDL (Data Definition Language): Define and manage database structures:

  • CREATE — Add new tables or databases.
  • ALTER — Modify table structures.
  • DROP — Remove tables or databases.

DCL (Data Control Language): Control access to the database with:

  • GRANT — Provide specific privileges to users.
  • REVOKE — Remove previously granted privileges.

TCL (Transaction Control Language): Manage transactions to maintain data integrity:

  • COMMIT — Save changes permanently.
  • ROLLBACK — Undo changes if an error occurs.

Mastering these commands gives you the power to handle data efficiently, ensuring your applications run smoothly and securely. 🚀

Follow me on LinkedIn for more animated software diagrams: linkedin

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

If you found this article helpful, please give a ❤️ or share a friendly comment!

Got it