0% found this document useful (0 votes)
6 views

SQL Query

Uploaded by

Dharmi Ghevariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

SQL Query

Uploaded by

Dharmi Ghevariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DIV: B RollNO:24BCM111

FUNDAMENTALS OF INFORMATION TECHNOLOGY

(Subject Code: 1CC601)


INDEX

Sr.No Practical Grade Faculty Sign Remarks

1 Create a RDBMS table for the Medical Store


Management using SQL.
Assign the PRIMARY KEY.
(Use CREATE,INSERT,SELECT)
2 Implement a SELECT query to find the students
details who are fail from the main table i.e.
STUDENTDETAILS. (Use where clause)
3 Implement the SQL query to sort the numbers.
(Use ORDER BY)
4 Implement the SQL query to give all the rows from
the table. (Use SELECT)
5 Implement the use of UPDATE, DROP query to
modify/delete the information in the table.
Total: 50
Q1. Create a RDBMS table for the Medical Store Management using SQL.
Assign the PRIMARY KEY. (Use CREATE, INSERT, SELECT)
Ans. create table MedicineStock(MedicineId int primary key,MedicineName Varchar(20),Price
int,ExpiryDate date);
insert into MedicineStock values(01,'Paracetamo',100,'2024-12-31');
insert into MedicineStock values(02,' Metfomin',120,'2025-03-1');
insert into MedicineStock values(03,'Amoxicillin',180,'2025-02-21');
insert into MedicineStock values(04,'Ibuprofen',120,'2024-11-30');
insert into MedicineStock values(05,'cetirizine',220,'2025-11-10');
select * from MedicineStock;
select Medicinename,price from medicinestock;

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;

You might also like