Advertisements
Advertisements
प्रश्न
Dr. Kavita has created a database for a hospital's pharmacy. The database includes a table named MEDICINE whose column (attribute) names are mentioned below:
MID: Shows the unique code for each medicine.MED_NAME: Specifies the medicine name.SUPP_CITY: Specifies the city where the supplier is located. STOCK: Indicates the quantity of medicine available. DEL_DATE: Specifies the date when the medicine was delivered.
Table: MEDICINE
| MID | MED_NAME | SUPP_CITY | STOCK | DEL_DATE |
| M01 | PARACETAMOL | MUMBAI | 200 | 2023-06-15 |
| M02 | AMOXICILLIN | KOLKATA | 50 | 2023-03-21 |
| M03 | COUGH SYRUP | BENGALURU | 120 | 2023-02-10 |
| M04 | INSULIN | CHENNAI | 135 | 2023-01-25 |
| M05 | IBUPROFEN | AHMEDABAD | 30 | 2023-04-05 |
Write the output of the following SQL Queries.
- Select LENGTH(MED_NAME) from MEDICINE where STOCK > 100;
- Select MED_NAME from MEDICINE where month(DEL_DATE) = 4;
- Select MED_NAME from MEDICINE where STOCK between 120 and 200;
- Select max(DEL_DATE) from MEDICINE;
थोडक्यात उत्तर
Advertisements
उत्तर
I.
| LENGTH(MED_NAME) |
| 11 |
| 11 |
| 7 |
II.
| MED_NAME |
| IBUPROFEN |
III.
| MED_NAME |
| PARACETAMOL |
| COUGH SYRUP |
| INSULIN |
IV.
| max(DEL_DATE) |
| 2023-06-15 |
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
