0% found this document useful (0 votes)
40 views4 pages

Lab 2

In this lab, students will practice using DML commands like INSERT, UPDATE, and DELETE. Students are instructed to populate a database table with at least 8 to 10 rows using INSERT commands. They then must use UPDATE commands to modify records and take screenshots showing the changes. Finally, students have to DELETE records from the table and again take screenshots to show the results. Examples of INSERT, UPDATE, and DELETE commands are provided and students are expected to execute these commands on their own table.

Uploaded by

Hamza Basharat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

Lab 2

In this lab, students will practice using DML commands like INSERT, UPDATE, and DELETE. Students are instructed to populate a database table with at least 8 to 10 rows using INSERT commands. They then must use UPDATE commands to modify records and take screenshots showing the changes. Finally, students have to DELETE records from the table and again take screenshots to show the results. Examples of INSERT, UPDATE, and DELETE commands are provided and students are expected to execute these commands on their own table.

Uploaded by

Hamza Basharat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab 2

In previous lab, we designed a database using DDL commands, in this lab we will practice DML
commands.
There are 4 type of DML commands.
1. Insert
2. Update
3. Delete
And to display or search from table we use “Select” command.
INSERT
Insert into ‘table name’ (column names) values (value to be
inserted)
Your task is, using insert command, populate your table with data, there should be at least 8,10
rows inserted in each table.
Update
update ‘table name’ set ‘column name’=’value to be updated’ where
‘column name’=value from table
You have to take screenshot of your table, then write a update command for a record and run the
command, after update again take screenshot and display.
Delete
Delete from ‘table name’ where ‘column name’=value
Using above given command, delete a record from table, you have to take before and after
deletion screenshot of the table.
INSERT INTO Business_Information(System_Name ,Starting_Year
,Email,Country,Phone_Number,Landline_No , Aaddress)
values ('Garage',2021,'[email protected]','Pakistan',03200,0423714,'Chahon Park Islampura
Lahore')
,('Garage',2022,'[email protected]','Pakistan',03200,0423714,'Islampura Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'Ravi Road Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'Ali Town Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'DHA Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'DHA Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'Gulshan ravi Lahore')
,('Garage',2021,'[email protected]','Pakistan',03200,0423714,'mall road Lahore')
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
update Business_Information set Phone_Number=030042 where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'
Delete from Business_Information where Email='[email protected]'

You might also like