Dbms Lab2 Ce097
Dbms Lab2 Ce097
i) CLIENT_MASTER
CLIENT_NO VARCHAR2(6),
NAME VARCHAR2(20),
ADDRESS1 VARCHAR2(30),
ADDRESS2 VARCHAR2(30),
CITY VARCHAR2(15),
STATE VARCHAR2(15),
PINCODE NUMBER(6),
BAL_DUE NUMBER(10, 2)
ii) PRODUCT_MASTER
DESCRIPTION VARCHAR2(15),
UNIT_MEASURE VARCHAR2(10),
COST_PRICE NUMBER(8, 2)
i) Data of client_master
3. On the basis of the above two tables write a query to answer the
following questions.
O/P:
b. Retrieve the list of names and cities of all the clients.
SELECT NAME, CITY FROM CLIENT_MASTER;
O/P:
c. List the various products available from the product_master table.
O/P:
O/P:
f. Find the products with description as ‘1.44 drive’ and ‘1.22 Drive’.
O/P:
g. Find all the products whose sell price is greater than 5000.
O/P:
h. Find the list of all clients who stay in city ‘Bombay’ or city ‘Delhi’ or ‘Madras’.
O/P:
i. Find the product whose selling price is greater than 2000 and less than or equal
to 5000.
SELECT * FROM PRODUCT_MASTER WHERE SELL_PRICE > 2000 AND
SELL_PRICE <= 5000;
O/P:
j. List the name, city and state of clients not in the state of ‘Maharashtra’.
O/P:
l. Delete the record with client 0001 from the client_master table.
o. Find the products whose selling price is more than 1500 and also find the new
selling price as original selling price * 15.
O/P:
p. Delete all products from the product_Master where the quantity on hand is
equal to 100.
q. Delete from Client_Master where the column state holds the value ‘TamilNadu’.