SQL Query
SQL Query
Output:
Q2. Implement a SELECT query to find the students details who are fail from the main
table i.e. STUDENTDETAILS. (Use where clause)
Ans. select MedicineId,medicinename,expirydate from medicinestock where price>130;
select medicinename,price from medicinestock where medicineid=2;
Q3. Implement the SQL query to sort the numbers. (Use ORDER BY)
Ans. select * from medicinestock order by price asc;
Select * from medicinestock order by medicineid desc;
Q4. Implement the SQL query to give all the rows from the table. (Use SELECT)
Ans. select * from MedicineStock;
Q5. Implement the use of UPDATE, DROP query to modify/delete the information in the
table.
Ans. update medicinestock set price=310 where medicineid=1;
insert into medicinestock values(6,'metrogil',210,'2025-12-1');
delete from medicinestock where medicineid=6;