Guide to write SQL using English meanings
Many beginners find SQL difficult because they try to memorize syntax instead of understanding the meaning of database operations. In reality, SQL is very close to everyday English instructions. Words like show, add, remove, or change directly map to SQL commands such as SELECT, INSERT, DELETE, and UPDATE. In this article, we will learn how to identify action words in a question and translate them into the correct SQL command. This simple approach helps students write SQL queries even without remembering complex syntax.
|
English Meaning |
SQL Keyword |
What it does |
|
Show / Display |
SELECT |
Read data |
|
Add / Insert / Enter |
INSERT |
Add new row |
|
Change / Increase / Modify |
UPDATE |
Modify data |
|
Remove / Delete / Strike off |
DELETE |
Remove row |
4️⃣ Write SQL using minimum syntax
Always end final SQL with “;” ( semicolon)
Example:
Question 1
Strike off the record of student Rahul
with student_id 100.
Step 1 – Identify Action
Strike
off → DELETE
Step 2 – Table
student
Step 3 – Condition
student_id = 100
Step 4 – SQL using minimum syntax
DELETE FROM student
WHERE stud_id = 100;
|
SQL Part |
Meaning |
|
DELETE |
remove |
|
FROM student |
from student table |
|
WHERE |
which record |
|
stud_id = 100 |
student id 100 |
Question 2
Name – Rajeev
Class – 12
Stream – Science
Step 1 – Identify Action
Add → INSERT
Step 2 – Table
student
Step 3 – VALUES
(123,'Rajeev',12,'Science')
Step 4 – SQL using minimum syntax
INSERT INTO student
VALUES (123,'Rajeev',12,'Science');
|
SQL |
Meaning |
|
INSERT INTO |
add data |
|
student |
table |
|
VALUES |
New data |
Question 3
Step 1 – Identify Action
Increase
→ UPDATE
Step 2 – Table
student
Step 3 – Condition
student_id = 123
Step 4 – SQL using minimum syntax
UPDATE student
SET English = English * 1.10
Where student_id = 123;
|
SQL |
Meaning |
|
UPDATE |
change data |
|
SET |
modify column |
|
English * 1.10 |
increase 10% |
|
English Phrase |
SQL |
|
show all records |
SELECT * |
|
show specific columns |
SELECT column |
|
add record |
INSERT |
|
remove record |
DELETE |
|
modify record |
UPDATE |
|
where student id = |
WHERE |
English commands -> SQL Keyword
|
English |
SQL Keyword |
|
Show student data |
SELECT |
|
Add new student |
INSERT |
|
Remove student |
DELETE |
|
Change marks |
UPDATE |
|
Word in Question |
SQL |
|
display / show |
SELECT |
|
add / enter |
INSERT |
|
increase / change |
UPDATE |
|
remove / strike off |
DELETE |
Stop Memorizing SQL: Learn to Translate English Sentences into SQL
No comments:
Post a Comment