SQL is the language used to work with many relational databases. You can use it to read records, add new data, change existing values, and remove records.

Reading Data with SELECT

SELECT name, email
FROM students
WHERE id = 1;

SELECT chooses the columns you want to read. FROM identifies the table, and WHERE limits results to matching rows.

Adding and Updating Data

INSERT INTO students (name, email)
VALUES ('Asha', 'asha@example.com');

UPDATE students
SET email = 'asha@school.example'
WHERE id = 1;

Deleting Carefully

DELETE FROM students
WHERE id = 1;

Always use a precise WHERE condition when updating or deleting data. Test a SELECT query first so you know exactly which rows will be affected.

Next Steps

After these fundamentals, practice sorting with ORDER BY, grouping with GROUP BY, and combining tables with JOIN.