0% found this document useful (0 votes)
7 views

Ankit Dbms

The document describes experiments performed on a database table called Employee. It details creating the table, adding a column, inserting records, updating a column, renaming a column, and deleting a record.

Uploaded by

Ankit Vashisth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Ankit Dbms

The document describes experiments performed on a database table called Employee. It details creating the table, adding a column, inserting records, updating a column, renaming a column, and deleting a record.

Uploaded by

Ankit Vashisth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment1.1
Student Name: Ankit Vashisth UID: 22BCS13378
Branch: BE-CSE Section/Group: 707(A)
Semester: 4th Date of Performance: 08/02/2024
Subject Name: DBMS Subject Code: 22CSH-254

1. Aim: Create a table called Employee with the following structure.


Name Type
Empno Number
Name Varchaar2[10]
Job varcher2[10]
Mgr number
Sal number
a) Add a column commission with domain in the Employee table.
b) Insert any five records int the table.
c) Update the column details of job.
d) Rename the column of Employ table using alter command.
e) Delete the Employee whose Empno is 5.

2. Objective:
The objective of the provided SQL statements is to perform various operations on the
"Employee" table within a relational database. Each statement serves a specific purpose:

a) Table Creation:
Objective: To create a table named "Employee" with specific columns (EMPNO,

ENAME, JOB, MGR, SAL, COMMISSION) and their respective data types. b) Column
Addition:
Objective: To add a new column named "COMMISSION" to the existing "Employee" table,
extending the table's structure to include commission information.

c) Data Insertion:
Objective: To insert five sample records into the "Employee" table, illustrating the
representation of different employees with distinct attributes such as employee number
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

(EMPNO), name (ENAME), job title (JOB), manager number (MGR), salary (SAL), and
commission (COMMISSION). d) Column Update:
Objective: To update the job details in the "JOB" column for a specific employee (EMPNO
1), reflecting changes in their job title.

e) Column Renaming:
Objective: To rename the "ENAME" column to "EMPLOYEE_NAME" in the
"Employee" table, providing a more descriptive and consistent column name. f)
Data Deletion:
Objective: To delete the employee with EMPNO 105 from the "Employee" table, removing
their record from the dataset.

3. DBMS script and output:


a) Add a column commission with domain in the Employee table.

b) Insert any five records int the table.


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

C) Update the column details of job.

d) Rename the column of Employ table using alter command.


DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

e) Delete the Employee whose Empno is 5.

You might also like