Dbms Notes
Dbms Notes
Lab Report
MySQL Operation
Data Manipulation Language (DML) Commands: Select, Insert Update & Delete.
5. Insert: Inserts new rows into a table.
After,
8. DELETE FROM customers WHERE id = 1;
12. TEXT OPERATORS: To fetch the city names that start with a 'P' or end with
an 's':
SELECT name
FROM city
WHERE name LIKE 'P%' or name LIKE '%s';
After Update
SELECT COUNT(student_id) AS
total_students
FROM students_info
WHERE department_name =
'Biology';
32. Update: Modify existing records.
Select * from Student_info Where student_name =”Lucas Gray”;
UPDATE students_info
SET department_name = 'Physics'
WHERE student_name = 'Lucas Gray';
Select * from Student_info Where student_name =”Lucas Gray”;
8 Abdul Awal Sajib
33. Delete: Remove records from the tables.
DELETE FROM students_info
WHERE student_name = 'Lucas Gray';
Select * from Student_info Where student_name =”Lucas Gray”;
SELECT student_name
FROM students_info
WHERE department_name = 'Biology'
ORDER BY student_name;
38. Select & Student with their department: SELECT * from student_details;