By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit |
SELECT 1
CREATE TABLE
INSERT 0 3
| specialtyid | specialty |
|---|---|
| 1 | Noorosurgery |
| 2 | Opthalmology |
| 3 | Family Medicine |
SELECT 3
CREATE TABLE
INSERT 0 13
| doctorid | doctorname | specialtyid |
|---|---|---|
| 1 | Doctor-00 | 1 |
| 2 | Doctor-01 | 2 |
| 3 | Doctor-02 | 3 |
| 4 | Doctor-03 | 1 |
| 5 | Doctor-04 | 2 |
| 6 | Doctor-05 | 3 |
| 7 | Doctor-06 | 1 |
| 8 | Doctor-07 | 2 |
| 9 | Doctor-08 | 3 |
| 10 | Doctor-09 | 1 |
| 11 | Doctor-10 | 2 |
| 12 | Doctor-11 | 3 |
| 13 | Doctor-12 | 1 |
SELECT 13
CREATE TABLE
INSERT 0 7
| referralid | officeid | doctorid | specialtyid |
|---|---|---|---|
| 1 | null | null | 2 |
| 2 | null | null | 3 |
| 3 | null | null | 1 |
| 4 | null | null | 2 |
| 5 | null | null | 3 |
| 6 | null | null | 1 |
| 7 | null | null | 2 |
SELECT 7
INSERT 0 2
INSERT 0 1
| doctorname | specialty |
|---|---|
| Doctor-00 | Noorosurgery |
| Doctor-01 | Opthalmology |
| Doctor-02 | Family Medicine |
| Doctor-03 | Noorosurgery |
| Doctor-04 | Opthalmology |
| Doctor-05 | Family Medicine |
| Doctor-06 | Noorosurgery |
| Doctor-07 | Opthalmology |
| Doctor-08 | Family Medicine |
| Doctor-09 | Noorosurgery |
| Doctor-10 | Opthalmology |
| Doctor-11 | Family Medicine |
| Doctor-12 | Noorosurgery |
| Doctor Bill | Neurosurgery |
SELECT 14
DELETE 2
| specialtyid | specialty |
|---|---|
| 3 | Family Medicine |
| 4 | Neurosurgery |
| 5 | Ophthalmology |
SELECT 3
| doctorname | specialty |
|---|---|
| Doctor-00 | Neurosurgery |
| Doctor-01 | Ophthalmology |
| Doctor-02 | Family Medicine |
| Doctor-03 | Neurosurgery |
| Doctor-04 | Ophthalmology |
| Doctor-05 | Family Medicine |
| Doctor-06 | Neurosurgery |
| Doctor-07 | Ophthalmology |
| Doctor-08 | Family Medicine |
| Doctor-09 | Neurosurgery |
| Doctor-10 | Ophthalmology |
| Doctor-11 | Family Medicine |
| Doctor-12 | Neurosurgery |
| Doctor Bill | Neurosurgery |
SELECT 14