SQL exercises on hospital Database: Find the floor and block where the room number 212 belongs to
SQL hospital Database: Exercise-5 with Solution
5. Write a query in SQL to find the floor and block where the room number 212 belongs to.
Sample table: room
SELECT blockfloor AS "Floor", blockcode AS "Block" FROM room WHERE roomnumber=212;
Floor | Block -------+------- 2 | 2 (1 row)
E R Diagram of Hospital Database:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?