Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

create Database Hospital1

Drop Database Hospital

use Hospital

create Database Hospital


on
(
Name = 'Hospital_Main',
Filename = 'D:\\NCC\Hospital.mdf',
Size = 100MB,
Maxsize = 500MB,
Filegrowth = 100MB
)
log on
(
Name = 'Hospital_log',
filename = 'D:\\NCC\Hospital.ldf',
Size = 50MB,
Maxsize = 300MB,
filegrowth = 50MB
)

use Recruitment
select * from ContractRecruiter

use Hospital

create table Treatment


(
TreatmentID char(10) not null Constraint
pkTreatmentID Primary Key,
PatientID char(10) not null constraint
fkTPatID Foreign Key References
Patient(PatientID),
TreatmentDate datetime,
Medication varchar(100)
)
drop Table Treatment
Create Table Patient
(
PatientID char(10) not null constraint
pkPatientID Primary Key,
PatientName char(50) not null,
DOB char(20) not null,
PhoneNo char(20) not null
)

insert into Treatment


values('TRMT001','PAT001',getdate(), 'Para' )

insert into Patient


values ('PAT002', 'Yaa
Mensah','11/11/2020','0144567890')

select * from Patient


select * from Treatment

You might also like