You are on page 1of 2

Create the SQL command for the below problems; use the tables below for the

instance of the database.

a. SQL command to inner join table DRUG and table PRESCRIPTION.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

b. SQL command to display columns “drug_name” and “pres_dosage”.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

c. SQL command to display all columns of tables DOCTOR, PATIENT and


PRESCRIPTION.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

d. SQL command to display all patient names and their assigned doctors.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

e. SQL command to join tables DRUG, PATIENT and PRESCRIPTION.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

You might also like