Design two stored procedures as the following (4 marks) Create a PARAMETER based SELECT QUERY stored procedure which return records based on parameters? > Create an UPDATE query based stored procedure

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

plz quickly ??????????????

 

/*Inserting into patient table*/

INSERT INTO patient
VALUES ('1234','Kim Minji','06-05-1994','0557375017');

INSERT INTO patient
VALUES ('1334','Han Sohee','06-07-1996','0567374017');

INSERT INTO patient
VALUES ('1434','Jeon soyeon','07-10-1998','0537372017');

INSERT INTO patient
VALUES ('1646','Lee Taemin','18-06-1993','0501346257');

INSERT INTO patient
VALUES ('1645','Yu jimin','11-09-2000','0501846257');


select*from patient;

/*Inserting into Doctor table*/
INSERT INTO DOCTOR VALUES(2000432, 'khaled' , '05-12-1994' , 0556677880,
'Dermatologists');

INSERT INTO DOCTOR VALUES(2000509, 'Ali' , '09-01-2000' , 0559918100, 'Dentistry');

INSERT INTO DOCTOR VALUES(2000389, 'Lewis' ,'21-01-1996' , 0559910000,
'Family Physicians');

INSERT INTO DOCTOR VALUES(2000504, 'Saleh' ,'16-06-1998' , 055611500,
'Family Physicians');

INSERT INTO DOCTOR VALUES(2000235, 'sara' ,'22-06-1998', 0557745500,
'Orthopedics');


select *from doctor;


/*Inserting into appointment table*/

INSERT INTO appointment VALUES (1, '12-08-21', '04:40',2000432,1234);

INSERT INTO appointment VALUES (2, '11-08-21', '06:00',2000509,1334);

INSERT INTO appointment VALUES (3, '04-09-21', '07:00',2000389,1434);

INSERT INTO appointment VALUES (4, '10-09-21', '01:46',2000504,1646);

INSERT INTO appointment VALUES (5, '17-10-21', '12:00',2000235,1645);


select *from appointment;


/*Inserting into drug table*/


insert into drug values(101,'Crocin',50);

insert into drug values(102,'Telmikind',130);

insert into drug values(104,'Combiflam',70);

insert into drug values(108,'Paracetamol',80);

insert into drug values(105,'Zocon',120);

 
select *from drug;


/*Prescription table*/

INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (10, '12-08-21', 100);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (11, '20-08-21', 150);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (12, '03-09-21', 200);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (15, '1-10-21', 250);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (16, '05-11-21', 350);

select *from prescription;

/*Receipt table*/

INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (1, '12-08-21' ,'05:10' , 12, 1234);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (4, '11-08-21', '06:30', 10, 1334);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (5, '04-09-21', '07:30', 11, 1434);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (9, '10-09-21 ', '02:06' , 15, 1646);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (19, '17-10-21', '12:30', 16, 1645);

select *from receipt;

/*Prescription_drug table*/

INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (101, 10);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (102, 11);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (104, 12);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (108, 15);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (105, 16);

select *from prescription_drug 

Design two stored procedures as the following (4 marks)
Create a PARAMETER based SELECT QUERY stored procedure which return records
based on parameters?
> Create an UPDATE query based stored procedure
Transcribed Image Text:Design two stored procedures as the following (4 marks) Create a PARAMETER based SELECT QUERY stored procedure which return records based on parameters? > Create an UPDATE query based stored procedure
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY