Professional Documents
Culture Documents
Umarmustafa Bce7a Dbs Lr2
Umarmustafa Bce7a Dbs Lr2
EXPERIMENT NO 2
Data presentation
Experimental results
Conclusion
Date: Signature:
AIR University Islamabad DBS LAB
LAB TASKS
Task1:
Create the following table using SQL and using the INSERT INTO command,
insert the following values in the table created.
CREATE TABLE Students (
Name varchar(25),
Reg_No int,
Courses varchar(255),
Course_Code int,
Offered_By varchar(255)
);
Output:
2
AIR University Islamabad DBS LAB
Task2:
Using the UPDATE statement, update the above table for the following values:
UPDATE Students
SET Course_Code='1001', Offered_By='Mr.A'
WHERE Reg_No='09';
UPDATE Students
SET Courses='DLD', Course_Code='1005', Offered_By='Mr.Z'
WHERE Reg_No='10';
Output:
SELECT * FROM Students;
3
AIR University Islamabad DBS LAB
Task3:
Select distinct values from the above two tables for the last three columns.
UPDATE Students
SET Course_Code='1001', Offered_By='Mr.A'
WHERE Reg_No='09';
UPDATE Students
SET Courses='DLD', Course_Code='1005', Offered_By='Mr.Z'
WHERE Reg_No='10';
4
AIR University Islamabad DBS LAB
Output:
5
AIR University Islamabad DBS LAB
Learning Outcomes:
DML is used to manipulate the data within the database. DDL is used to create and modify
database objects like tables, indexes, views, and constraints. DML is used to perform
operations on the data within those database objects.
DDL statements are typically executed less frequently than DML statements.
The primary purpose of DML commands is to select, insert, delete, update, and merge data
records in RDBMS.