Loading Depth Study
Preparing your workspace
CRUD operations are the basic actions applications perform on persistent data.
INSERT adds records, SELECT retrieves data, UPDATE changes existing records, and DELETE removes records. WHERE conditions are extremely important because they determine which rows are affected. SELECT can return specific columns instead of every field, which is often better for clarity and performance. UPDATE and DELETE should always be used carefully with precise conditions.
A student management system can create students, list students, update a student's name, or remove an inactive record.
INSERT INTO students (name, email)
VALUES ('Aman', 'aman@example.com');
SELECT id, name, email
FROM students;
UPDATE students
SET name = 'Aman Kumar'
WHERE id = 1;
DELETE FROM students
WHERE id = 1;The statements insert a student, retrieve students, update one student, and delete one student.