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

Name: Utsav Vashist Section: 41 Group: "A" UID: 20BCS9452 Subject: Dbms Lab Experiment 1.1

The document describes an experiment to create an Employee database table with columns for employee number, name, job, manager number, salary, and commission. It provides SQL code to add the commission column, insert 5 sample records, update the job column name to post, and delete a record.
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)
16 views4 pages

Name: Utsav Vashist Section: 41 Group: "A" UID: 20BCS9452 Subject: Dbms Lab Experiment 1.1

The document describes an experiment to create an Employee database table with columns for employee number, name, job, manager number, salary, and commission. It provides SQL code to add the commission column, insert 5 sample records, update the job column name to post, and delete a record.
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/ 4

NAME : UTSAV VASHIST

SECTION : 41
GROUP : “A”
UID : 20BCS9452
SUBJECT : DBMS LAB

EXPERIMENT 1.1

1. Create a table called Employee with the following


structure.
Name Type
Empno Number
Ename Varchar2(10)
Job Varchar2(10)
Mgr Number
Sal Number

Code :
create table employee
(
empno number,
ename varchar2(10),
job varchar2(10),
mgr number,
sal number
);
alter table employee
add commission varchar(10);
insert into employee
values(110,'yana','clerk',5402,3000,100);
insert into employee
values(105,'avi','manager',5112,5000,200);
insert into employee
values(169,'nitin','salesman',5407,10000,300);
insert into employee
values(180,'sahil','designer',5445,8000,150);
insert into employee
values(147,'kartik','analyst',5123,3000,200);
update employee
set job='salesman'
select * from employee;
alter table employee
rename column job to post;
select * from employee;
delete from employee
where empno=105;
select * from employee;

a. Add a column commission with domain to the


Employee table.
b. Insert any five records into the table.

c. Update the column details of job.

You might also like