You are on page 1of 2

Table Name: CLIENT_MASTER (please add last four digits of your registration number to make table name unique)

Description: Used to store client information Column Name CLIENTNO NAME ADDRESS1 ADDRESS2 CITY PINCODE STATE BALDUE Data Type Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Number Varchar2 Number Size 6 20 30 30 15 8 15 10,2 Attributes Primary Key / first letter must start with C Not Null

Insert the following data into their respective tables: ClientNo C00001 C00002 C00003 C00004 C00005 C00006 Name Anil Sachin Dravid Ganguly Sehwag Harbhjan City Madras Mumbai Mumbai Bangalore Banglore Jalandhar Pincode 780001 400054 400057 560001 560001 144401 State Tamil Nadu Maharashtr a Maharashtr a Karnataka Karnataka Punjab BalDue 15000 0 5000 7000 2000 0

Perform the following operation on Table Name: Client_Master


1. List the names of all clients having a in their names. 2. List the CleintNo and Name of clients who stay in a city whose First letter is M or Last letter is e 3. List the information about the clients whose state is Maharashtra, Karnataka, Punjab. 4. List the client details for ClientNo C0001, C0003 and C0006 and the results should be in ascending order by their name. 5. List the ClientNo and Name of all the clients having the balance amount to be paid between 1000 and 15000.

6. Create a table Balance_Details from Client_Master with columns ClientNo, Name,City and BalDue) 7. Make the ClientNo in the Balance_Details table as the foreign key to the ClientNo in the Client_Master table. 8. Delete all the values from the Balance_Details table and then insert the values from Client_Master into the Balance_Details table. 9. List the city and the number of clients we have in city named Mumbai, Bangalore. 10.What is the total balance amount pending against the clients? 11.List the client details for the minimum and maximum balance amount pending against them. 12.List the average of the amount pending against the all the clients. 13.Create a view by selecting the baldue from the balance_details table and client_no, name from the client_master table. 14.Try to update the values in the view. 15.Permanenetly delete the view from the database.

You might also like