CBSE · 083Class XII · 2022Section A1 mark

Question 6a

7 June 2022 · Computer Science (083)

Table: DOCTOR

DNODNAMEFEES
D1AMITABH1500
D2ANIKET1000
D3NIKHIL1500
D4ANJANA1500

Table: PATIENT

PNOPNAMEADMDATEDNO
P1NOOR2021-12-25D1
P2ANNIE2021-11-20D2
P3PRAKASH2020-12-10NULL
P4HARMEET2019-12-20D1

Write the output of the SQL query: SELECT DNAME, PNAME FROM DOCTOR NATURAL JOIN PATIENT;

Answer

DNAMEPNAME
AMITABHNOOR
ANIKETANNIE
AMITABHHARMEET

Explanation

Performs a natural join on the common column DNO and selects Doctor and Patient names.