0% found this document useful (0 votes)
3 views3 pages

DBMS3

The document outlines Experiment No. 3 for a Database Management System Laboratory, focusing on the implementation of ALTER and UPDATE SQL commands. It includes the syntax for modifying database objects and provides examples of adding, modifying, and dropping columns in a table. The conclusion states that the commands were successfully studied and implemented.

Uploaded by

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

DBMS3

The document outlines Experiment No. 3 for a Database Management System Laboratory, focusing on the implementation of ALTER and UPDATE SQL commands. It includes the syntax for modifying database objects and provides examples of adding, modifying, and dropping columns in a table. The conclusion states that the commands were successfully studied and implemented.

Uploaded by

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

DEPARTMENT OF COMPUTER ENGINEERING Experiment No: 3

Semester S.E. Semester III – Computer Engineering


Subject Database Management System Laboratory.
Lecture Professor In-charge Prof. Divya Surve
Practical Professor In-Charge Prof. Suja Jayachandran
Laboratory number M312

Student Name Madhura Vilas Suroshe


Roll Number 24102C2002
Grade Teacher’s Signature

Experiment 3
No:
Experiment To study and implement Alter and Update commands
Title
Resources / Hardware: Software: Draw io
Apparatus PC
Required
Theory ALTER Command:

The ALTER command in SQL is used to modify an existing database object, such
as a table. It can be used to add, modify, or delete columns and constraints.
Syntax-
1. Add a Column
ALTER TABLE table_name
ADD column_name data_type [constraint];

2. Modify a Column
ALTER TABLE table_name
MODIFY column_name new_data_type [constraint];

3. Drop a Column
ALTER TABLE table_name
DROP COLUMN column_name;

UPDATE Command: To modify existing records in a table.

Syntax:
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
Here,
table_name: The name of the table where you want to update records.
SET: Specifies the columns to be updated and their new values.
WHERE: Specifies which records should be updated. If omitted, all records in
the table will be updated.

SQL To create Table emp.


Commands
and Output

Output:

To Alter table by adding column email:

Output:
Output:

Dropping a Column Email:

Output:

Conclusion Successfully studied and implemented Alter and Update commands.

You might also like