0% found this document useful (0 votes)
430 views4 pages

Insert The Following Data Into Their Respective Tables:: A) Data For CLIENT - MASTER Table

The document describes hands-on exercises for creating, populating, and manipulating tables in a database. It includes instructions for creating three tables - CLIENT_MASTER, PRODUCT_MASTER, and SALESMAN_MASTER - and inserting sample data. Exercises are then provided to retrieve, update, delete and alter records in the tables, as well as delete and rename one of the tables.

Uploaded by

Tahmidur kadery
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)
430 views4 pages

Insert The Following Data Into Their Respective Tables:: A) Data For CLIENT - MASTER Table

The document describes hands-on exercises for creating, populating, and manipulating tables in a database. It includes instructions for creating three tables - CLIENT_MASTER, PRODUCT_MASTER, and SALESMAN_MASTER - and inserting sample data. Exercises are then provided to retrieve, update, delete and alter records in the tables, as well as delete and rename one of the tables.

Uploaded by

Tahmidur kadery
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

HANDS ON EXERCISES

1. Create the tables described below:


Table Name: CLIENT_MASTER
Description: Used to store client information

Column Name Data Type Size Default Attributes


CLIENTNO Varchar2 6
NAME Varchar2 20
CITY Varchar2 15
PINCODE Number 8
STATE Varchar2 15
BALDUE Number 10
Table Name: PRODUCT_MASTER
Description: Used to store product information

Column Name Data Type Size Default Attributes


PRODUCTNO Varchar2 6
DESCRIPTION Varchar2 15
PROFITPERCENT Number 4
UNITMEASURE Varchar2 10
QTYONHAD Number 8
REORDERLVL Number 8
SELLPRICE Number 8
COSTPRICE Number 8
Table Name: SALESMAN_MASTER
Description: Used to store salesman information working for the company.

Column Name Data Type Size Default Attributes


SALESMANNO Varchar2 6
SALESMANNAME Varchar2 20
ADDRESS1 Varchar2 30
ADDRESS2 Varchar2 30
CITY Varchar2 20
PINCODE Number 8
STATE Varchar2 20
SALAMT Number 8
TGTTOGET Number 6
YTDSALES Number 6

2. Insert the following data into their respective tables:


a) Data for CLIENT_MASTER table:
ClientNo Name City Pincode State BalDue
C00001 Ivan Bayross Mumbai 400054 Maharashtra 15000
C00002 Mamta Mazumder Madras 780001 Tamil Nadu 0
C00003 Chhaya Bankar Mumbai 400057 Maharashtra 5000
C00004 Ashwini Joshi Bangalore 560001 Karnataka 0
C00005 Hansel Colaco Mumbai 400060 Maharashtra 2000
C00006 Deepak Sharma Mangalor 560050 Karnataka 0
e

b) Data for PRODUCT_MASTER table:

ProductN Description Profit Unit QtyON ReorderLv SellPrice Cost


o Percent Measur HAND l Price
e
P00001 T-Shirts 5 Piece 200 50 350 250
P0345 Shirts 6 Piece 150 50 500 350
P06734 Cotton Jeans 5 Piece 100 20 600 450
P07865 Jeans 5 Piece 100 20 750 500
P07868 Trousers 2 Piece 150 50 850 550
P07885 Pull Overs 2 Piece 80 30 700 450
P07965 Denim Shirts 4 Piece 100 40 350 250
P07975 Lycra Tops 5 Piece 70 30 300 175
P07865 Skirts 5 Piece 75 30 450 300

c) Data for SALESMAN_MASTER table:

SALESMA Name Addre Address2 City PinCode State SalAmt TgtToGet YtdSales
NNo ss1
S00001 Aman A/14 Worli Mumbai 400002 Maharashtra 3000 100 50
S00002 Omkar 65 Nariman Mumbai 400001 Maharashtra 3000 200 100
S00003 Raj P-7 Bandra Mumbai 400032 Maharashtra 3000 200 100
S00004 Ashish A/5 Juhu Mumbai 400044 Maharashtra 3500 200 150

3. Exercise on retrieving records from a table


a. Find out the names of all clients.
b. Retrieve the entire contents of the Client_Master table
c. Retrieve the list of names, city and the state of all the clients
d. List the various products available from the Product_Master table.
e. List all the clients who are located in Mumbai
f. Find the names of salesman who have a salary equal to 3000

4. Exercise On updating records in a table


a. Change the city of ClientNo ‘C00005’ to ‘Bangalore’.
b. Change the BalDue of ClientNo ‘C00001’ to 1000
c. Change the cost price of ‘Trousers’ to 950.00
d. Change the city of the salesman to Pune

5. Exercise on deleting records in a table


a. Delete all salesmen from the Salesman_Master whose salaries are equal to 3500.
b. Delete all products form Product_Master where the quantity on hand is equal to 100.
c. Delete from Client_Master where the column state holds the value ‘Tamil Nadu.

6. Exercise on altering the table structure


a. Add a column called ‘Telephone’ of data type ‘number’ and size=’10’ to the Client_Master table.
b. Change the size of SellPrice column in Product_Master to 10

7. Exercise on deleting the table structure along with the data


a. Destroy the table Client_Master along with its data.

8. Exercise on renaming the table


a. Change the name of the Salesman_Master table to sman_mast.

4 (a) Update Client_Master Set City='Bangalore' where ClientNo='C00005';


(b) Update Client_Master Set BalDue='1000' where ClientNo='C00001';
(c) Update Product_Master Set CostPrice='950' where Description='Trousers';
(d) Update Client_Master Set City='Pune';
5 (a) Delete from Salesman_Master where SalAmt='3500';

6(a) Alter Table Client_Master add (Telephone number(10));


(b) Alter Table Product_Master Modify (Sellprice number(10));

7(a) drop table Client_Master;

8(a) rename Saleman_master to sman_mast:

You might also like