create table Dept (Dno int primary key, Dname varchar(30), Dloc varchar(50))

insert dept values (10,'IT','JHB')
insert dept values (20,'FIN','JHB')
insert dept values (30,'SALES','JHB')

select * from Dept

create table Employee (Eid int primary key,Ename varchar(50),Salary money, Dno int foreign key references Dept(Dno))

insert Employee values(1000,'Niz',35000,10)
insert Employee values(1001,'Gomo',30500,20)
insert Employee values(1002,'MO',47000,30)

create table nextofkin (Fname varchar(50) not null, IDNO int primary key, Sname varchar(50) not null,cellphoneNo int unique,
Eid int
constraint emp_FK --- define a constraint field
foreign key(Eid) references Employee(Eid))


select * from Employee

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: