Thursday, September 11, 2008

ORACLE ASSIGN-1

Q.1 Create Table

A) create the table CLIENT with following attributes

Clientno varchar2(6)
Name varchar2(20)
Address1 varchar2(30)
Address2 varchar2(30)
City varchar2(15)
Pincode number(8)
State varchar2(15)
Baldue number(10,2 )


B) create the table PRODUCT with following attributes

Productno varchar2(6)
description varchar2(15)
profitpercent number(4,2)
unitmeasure varchar2(10)
qtyinhand number(8)
reorderlvl number(8)
sellprice number( 8,2)
costprice number (8,2)

C) create the table SALESMAN with following 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,2 )
TGTTOGET NUMBER (6,2 )
YTDSALES NUMBER (6,2 )
REMARKS varchar2 (60)
Q.2 Insert the following data into respective tables:

a. data for CLIENT table (6 records)
b. data for PRODECT table (9 records)
c. data for SALESMAN table (4 records)

Q.3 Retrieving records from a table

a. find out the names of all the clients
b. retrieve the entire contents of the client table
c. retrieve the list of names, city and the state of all the clients.
d. List the various products available from the product table
e. List all the clients who are located in Mumbai
f. Find the names of salesmen who have a salary equal to Rs 3000.

Q.4 updating records in a table

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

Q.5 Delete records in a table
a) Delete all salesmen from the Salesman whose salaries are equal to Rs. 3500
b) Delete all products from Product where the quantity on hand is equal to 100
c) Delete from Client where the column state holds the value ‘Tamil nadu’.

Q.6 Altering table structure

a. Add a column called ‘Telephone’ of data type ‘number’ and size=’10’ to the Client table.
b. Change the size of Sellprice column in product to 10,2

Q.7 deleting the table structure along with the data
a. Destroy the table Client along with its data

Q.8 Renaming the table
a. Change the name of the salesman table to sman.

4 comments:

Anonymous said...

Sunita Madam!
You are the BEST of the best in our MCA department.
Thank you very much for your kindness and great method of teaching.
I pray at GOD for your all happiness and sucess in life.
Your obliged.

Chinku said...

Thank u Mam! I am very much impressed & thankful by your teaching style. You are my favorite teacher in our department...............

Unknown said...

2ND CLASS IN DBMS LAB.........TO MUCH TIRING WITH LOTS OF FUN........THANKS A LOT SUNITA MAM!!!

Technogynny said...

OM SIR UR THE BEST SIR WHICH I EVER MEET.....U FRIENDLY NATURE APPRECIATEE ......US mECHANICAL (ME-2)