π MySQL Practice Day β Clauses, Conditions & Fun with Queries


Today was a super fun and insightful day in my MySQL journey π. Under the amazing guidance of Shafiq Sir, I revised some core MySQL concepts with hands-on experience β and trust me, learning this way feels different! No just theory, only practical magic π»β¨.
π§ What I Practiced Today
Hereβs what I revised and implemented step-by-step:
1οΈβ£ Creating a Simple Table
I created a basic student
table with first and last name fields. Simple structure, but a great way to get hands-on with CREATE TABLE
.
π Example: I created a table for students with fields like First Name and Last Name.
2οΈβ£ Inserting Data
Added multiple entries into the table, including a row where the last name was missing. This helped me understand how MySQL handles NULL
values.
π Example: I inserted a student named "Haero" with no last name.
3οΈβ£ Selecting Data
Used a SELECT * FROM student
to view all records. It's always a satisfying moment to see the data you added show up right there! π
4οΈβ£ Using LIKE
and LOWER()
Tested out the LIKE
operator, which is case-sensitive in MySQL. I used LOWER()
to make the search smoother.
π Example: I searched for all first names starting with 'T' (like "Tani") using LIKE
after converting names to lowercase.
5οΈβ£ Conditional Display with CASE
Explored the CASE
statement to handle NULL values gracefully.
π Example: If the last name is missing, I showed a custom message like βNo name sorryβ; otherwise, a fun message like βnAME NAME EHEHβ.
π‘ Learnings of the Day
β
LIKE
is case-sensitive in MySQL. To perform a case-insensitive search, useLOWER()
orUPPER()
.β Handling
NULL
values smartly makes your results more readable.β Real-world SQL is not just about queries β itβs about clean data handling and logic-building.
β Hands-on practice > theory-only learning!
π Resources & Guidance
π₯ Covered 3 videos from a 7-part industry-level SQL series (shared by Shafiq Sir). These videos are focused on real-world applications, not just textbook definitions.
π¨βπ« Huge shoutout to my mentor Shafiq Sir π β thank you for making learning enjoyable and practical!
β¨ My Thoughts
Learning SQL this way β by practicing, making mistakes, correcting them, and reflecting β has completely changed my mindset. Earlier it felt technical, now it feels powerful πͺ.
I used to think SQL was just for querying β now I see it as a conversation with data.
π§Ύ Quote of the Day
"Tell me and I forget. Teach me and I remember. Involve me and I learn." β Benjamin Franklin
Radhe Radhe πΈ
Happy Learning,
β Tanish
Subscribe to my newsletter
Read articles from TheTansih directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
