Dbms Lab Work
Dbms Lab Work
Table:
Categories
Table:
Employees
Table:
OrderDetails
Table: Orders
Table: Products
Table: Shippers
Table: Suppliers
Q.Display all records if every proce is given a 20% raise in products table.
=SELECT ProductID,ProductName,SupplierID,CategoryID,Unit,Price*1.2
FROM products;
Q. Display the details of the employee that works for Nepal Bank and has salary >10000.
SELECT E.person_name,E.street,E.city
FROM employee E, works W
WHERE E.person_name=W.person_name AND W.bank_name='Nepal Bank' AND W.salary>10000;
Q.2022
Q.1 Consider the relation Actress-Details and write the SQL statement fo the following queries.
i. Create the table Actress_details.
iii. Modify the database so that Renu's new release is "win the race" film.
ANS:
i. CREATE TABLE Actress_Details
(
Players_id int not null,
Actress_name varchar(50),
Debut_year int,
Recent_release varchar(50),
Actress_fee int,
PRIMARY KEY (Players_id)
);
INSERT INTO actress_details VALUES(1, 'Renu', 2010, 'Samay', 400000);
INSERT INTO actress_details VALUES(2, 'Sita', 2022, 'Radha', 300000);
INSERT INTO actress_details VALUES(3, 'Geeta', 2001, 'Mato', 600000);
INSERT INTO actress_details VALUES(4, 'Amita', 1990, 'Man', 700000);
INSERT INTO actress_details VALUES(5, 'Karishma', 1989, 'Prem', 100000);