Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

DBMS

LabFAT
Reg No: 19BCE0971
Name: Aashish Sharma
1 Create a table Medicines with schema medicines=(med_name, brand,
dosage, manu_date, exp_date). Ensure that manu_date should not be later than exp_date. Create
an appropriate constraint to ensure this. (3)

2 Drop address attribute from staff table and add attributes door_no, street, city, and pincode. (3)
3. Find the list of all patients who were admitted in bed number ‘B101’ (3)

4. Find the name and address of the patient who paid the highest bill of all patients. (3)
5. Find the name and id of all patients who are older than all the doctors in the entire ‘cardiology’
department. Use subqueries and ALL operator (3)

6. Find the list of doctors who worked in the department which is started on or after ’10-May-
2018’.(5)
7. Display the list of doctors who are working in the department with more number of doctors using
sub-query and IN operator (5)

2a
2b Write a PL/SQL stored procedure to adjust the payment type of hospital bills to CASH if the
patient id and amount details given as input

2c Write a CURSOR to change the department number from 1 as 5 for all doctors with a qualification
‘MD’.

You might also like