0% found this document useful (0 votes)
8 views1 page

SQL Database for Hospital Records

The document outlines SQL commands for managing a hospital records database named 'hospital_records_2025'. It includes creating a table for patient information, inserting patient records, querying the data, and updating a patient's diagnosis. The operations demonstrate basic database management tasks such as creation, insertion, selection, and updating of records.

Uploaded by

Ciara
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

SQL Database for Hospital Records

The document outlines SQL commands for managing a hospital records database named 'hospital_records_2025'. It includes creating a table for patient information, inserting patient records, querying the data, and updating a patient's diagnosis. The operations demonstrate basic database management tasks such as creation, insertion, selection, and updating of records.

Uploaded by

Ciara
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Name: Angwi Ciara Fomunung

Section C
1.
CREATE DATABASE hospital_records_2025;

2.

CREATE TABLE patient_info (


patient_id INT PRIMARY KEY NOT NULL,
Ward_no VARCHAR(10),
diagnosis VARCHAR(20)
);

3.
INSERT INTO patient_info (patient_id, Ward_no, diagnosis)
VALUES (01, 'P101',’Malaria’);

INSERT INTO patient_info (patient_id, ward_no, diagnosis)


VALUES (02, 'P102', 'Cancer');

4.
SELECT * FROM patient_info;

5.
SELECT * FROM patient_info

WHERE patient_id = 01;

6.
UPDATE patient_info
SET diagnosis = 'Typhoid'
WHERE patient_id = 01;

7
SELECT * FROM patient_info;

You might also like