You are on page 1of 1

HSNC University , Mumbai

Kishinchand Chellaram College, Mumbai – 20.


SY B.Sc. (I.T.) Semester III

PRACTICAL NO. I(B)

create table Department(


Did varchar(10) primary key,
Dname varchar(20) unique,
Dlocation varchar(30))
create table Department(
Did varchar(10) primary key,
Dname varchar(20) unique,
Dlocation varchar(30))
select*from Department
insert into Department values('D1','IT','Mumbai')
insert into Department values('D2','IT', 'Pune')
create table emu(
eid varchar(5) primary key,
ename varchar(20) not null,
esalary money,
edoj datetime,
commission numeric(5) check(commission >= 100 and
commission<=500),
ejobtitle varchar(15) unique,
ejobcode char(5) default(103),
Did varchar(10) foreign key references Department(Did))
select*from emu
alter table Employee
add constraint c1 primary key (Eid)

You might also like