How I Started Learning SQL (What Helped Me the Most)

SQL? Just another programming language, right? That’s what I thought—until I realized how powerful it is for managing data. As an aspiring computer science student in my first year, I had no idea how databases worked or why SQL was important. I just knew I needed to use it.

I’m still learning, to be honest. But along the way, I’ve picked up a few things that helped me make sense of it all—and I wanted to share them here, in case someone else is going through the same “what even is a JOIN?!” phase. 😅

At first, I wasn’t even aware of queries or how they functioned. However, as I started learning SQL commands, I quickly realized how powerful it is for managing and analyzing data. Since databases are the heart of almost every application, mastering SQL felt like an essential step in my tech journey.

As I prepared for job roles, I started diving deeper into SQL. Initially, it felt so straightforward—just use SELECT to fetch data. Easy peasy! Writing queries and seeing the output felt so satisfying. It boosted my confidence, and for a moment, I thought, Wow, I can actually write SQL! Woohoo! 🎉

But, of course, the deeper I went, the more complex it became.

The First Challenges: Joins & Subqueries

I still remember my first encounter with joins. I wrote a query expecting clean results, but instead, I got twice the number of rows I was expecting. What just happened?!

Then came subqueries. At first, I thought, why even use them? Why not write separate queries? But once I started solving real-world problems, I saw how nested queries made SQL much more powerful.

The biggest lesson?

SQL isn’t just about knowing syntax; it’s about understanding how data is structured and related. Breaking SQL Into 5 Categories Helped Me Learn Faster

To make learning easier, I categorized SQL into five sections:

🔹 Data Query Language (DQL): Retrieves data (SELECT)
🔹 Data Definition Language (DDL): Defines database structure (CREATE, ALTER, DROP)
🔹 Data Manipulation Language (DML): Modifies records (INSERT, UPDATE, DELETE)
🔹 Transaction Control Language (TCL): Manages transactions (COMMIT, ROLLBACK, SAVEPOINT)
🔹 Data Control Language (DCL): Manages permissions (GRANT, REVOKE)

Since DQL (retrieving data) is used the most, I focused on that first. I also started using functions like COUNT(), AVG(), and SUBSTRING(), which made me appreciate how much you can do with just a few SQL commands.

My Key Learning Moments

DDL (Table Design Matters!)
I learned the hard way that planning a table before creating it saves a lot of headaches. Choosing the right data types, constraints (PRIMARY KEY, NOT NULL, UNIQUE), and relationships early on prevents issues later.

TCL (The Importance of Transactions)
Before learning TCL (Transaction Control Language), I never thought about what happens when a query fails mid-execution. But COMMIT, ROLLBACK, and SAVEPOINT taught me how databases handle failures and ensure consistency.

DELETE vs TRUNCATE vs DROP
This was a game-changer:

  • DELETE removes specific rows, but keeps the table and is rollback-able.

  • TRUNCATE removes all rows, but cannot be rolled back.

  • DROP deletes the entire table, structure and all. (Oops! 😅)

Making this mistake once is enough to never forget it.

How I Practiced SQL & What Worked Best for Me

  • LeetCode SQL Challenges – The Top 50 SQL Questions were super helpful.

  • Oracle 10g – Practicing in an actual database environment made concepts click.

  • Building Small Projects – Creating sample tables helped me understand relationships better.

  • W3Schools SQL Tutorial – Easy to follow and beginner-friendly.

What’s Next in My SQL Journey?

I’m still learning, but my next goals are:
- Writing optimized queries for better performance
- Understanding database normalization for efficient design
- Learning indexing techniques to speed up queries

SQL has been challenging but rewarding, and I’m excited to keep improving.

If you’re also learning SQL, what’s been the hardest concept for you? Let me know in the comments—I’d love to hear your experiences! 😊

10
Subscribe to my newsletter

Read articles from Mrunali Parsekar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mrunali Parsekar
Mrunali Parsekar

Exploring tech, simplifying concepts, and writing about them.