Write an anonymous PL/SQL block that will delete all patients for doctors that works in the Family Practice Verify that patients have been deleted accordingly. Then do a select * from patients where doc_id = (select doc_id from doctor where area = ‘Family Practice’. You should get no rows.
Write an anonymous PL/SQL block that will delete all patients for doctors that works in the Family Practice Verify that patients have been deleted accordingly. Then do a select * from patients where doc_id = (select doc_id from doctor where area = ‘Family Practice’. You should get no rows.
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...
Related questions
Question
100%
INFO 2303
Assignment : PL/SQL Practice
Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL.
Write an anonymous PL/SQL block that will delete all patients for doctors that works in the Family Practice Verify that patients have been deleted accordingly. Then do a select * from patients where doc_id = (select doc_id from doctor where area = ‘Family Practice’. You should get no rows.
![DROP TABLE PATIENT cascade constraints;
DROP TABLE BILLING cascade constraints;
DROP TABLE DOCTOR cascade constraints;
DROP TABLE RENTAL cascade constraints;
DROP TABLE MOVIE cascade constraints;
DROP TABLE CUSTOMER cascade constraints;
CREATE TABLE DOCTOR
(DOC_ID
DOC NAME
DATEHIRED
NUMBER(3),
VARCHAR2(9),
DATE,
NUMBER(12),
VARCHAR2(20),
NUMBER(3),
NUMBER(3),
NUMBER(5),
SALPERMON
AREA
SUPERVISOR_ID
CHGPERAPPT
ANNUAL BONUS
CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY
(DOC_ID));
CREATE TABLE PATIENT
(PT_ID
PT LNAME
PT FNAME
PTDOB
DOC ID
NEXTAPPTDATE
LASTAPPTDATE
NUMBER(3),
VARCHAR2(15),
VARCHAR2(15),
DATE,
NUMBER(3),
DATE,
DATE,
CONSTRAINT PATIENT_PT_ID PK PRIMARY KEY
(PT_ID),
CONSTRAINT PATIENT_DOC_ID_FK FOREIGN
KEY(DOC_ID)
REFERENCES DOCTOR);](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa9b8157d-ec23-4bbf-8be1-569f0be7b6e8%2Fbb156da8-4ca3-4d32-ac77-838c7375bd42%2F0nyi84_processed.jpeg&w=3840&q=75)
Transcribed Image Text:DROP TABLE PATIENT cascade constraints;
DROP TABLE BILLING cascade constraints;
DROP TABLE DOCTOR cascade constraints;
DROP TABLE RENTAL cascade constraints;
DROP TABLE MOVIE cascade constraints;
DROP TABLE CUSTOMER cascade constraints;
CREATE TABLE DOCTOR
(DOC_ID
DOC NAME
DATEHIRED
NUMBER(3),
VARCHAR2(9),
DATE,
NUMBER(12),
VARCHAR2(20),
NUMBER(3),
NUMBER(3),
NUMBER(5),
SALPERMON
AREA
SUPERVISOR_ID
CHGPERAPPT
ANNUAL BONUS
CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY
(DOC_ID));
CREATE TABLE PATIENT
(PT_ID
PT LNAME
PT FNAME
PTDOB
DOC ID
NEXTAPPTDATE
LASTAPPTDATE
NUMBER(3),
VARCHAR2(15),
VARCHAR2(15),
DATE,
NUMBER(3),
DATE,
DATE,
CONSTRAINT PATIENT_PT_ID PK PRIMARY KEY
(PT_ID),
CONSTRAINT PATIENT_DOC_ID_FK FOREIGN
KEY(DOC_ID)
REFERENCES DOCTOR);
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY