Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please solve this query

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ranchar first of all sorry to ask this oracle question on this forum. But if possible the please give me the answer of the following query please sir as soon as i have a assignment ahead


Create table client_master with following constraints:

a) Client_no must be the primary key.

b) Data variable being inserted into the coloumns Client_no must start with capital letter 'C'

c) Data value being insertd into the coloumn NAME should be upper case only.

d) Only allow "BOMBAY","DELHI","MADRAS", and "CALCUTTA" as legitmate value for the column city.

structure of file as follow

COLOUMN NAME DATA TYPE SIZE
Client_NO VARCHAR2 06
Name VARCHAR2 20
Address VARCHAR2 30
City VARCHAR2 15
State VARCHAR2 15
Balance NUMBER 10,2

Insert at least 5 data

Write the query as for following

1) Modify the field name of the table. Client_master to now hold maximum of 25 characters values.

2)Retrive the client information like Client_no,name and balance for all clients where the field city was the value BOMBAY or DELHI

3)Retrived specified client information for the clients who are NOT in "MADRAS" or "DELHI"

4)Retrive all row from the table client_master and display this data sorted by the value contained in the field NAME in Ascending order.

5) Delete only data from the table client_master.

6)Delete table client_master along with itts structure.


Regard

Arun kumar maalik
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34423
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arun,
It's ok to ask Oracle questions in this forum. However, I don't see what the question is. You posted your assignment. What are you stuck on? What do you have so far?

(Nobody here is going to do the assignment for you, just point you in the right direction.)
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Assignment sir please i have written the answer of these question but i want to match the answer of my question with you pepole answer so please

Regard

Arun
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right. So go ahead and post your answers, and then we'll compare ours with what you post and discuss any differences. Otherwise, it just looks like you are trying to get somebody to provide you with the answers.
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay fine

create table client_master
client_name varchar2(6) primary key,
Name varchar2(20),//Here i don't know what will for upper case only
Address varchar2(30),
city varchar2(15) in("BOMBAY","DELHI","MADRASH","CALCUTA"),
state varchar2(15),
Balance number(10,2);

Now sir i want to answer of this question only actualy how will i add the constraint in these column so that Client_no column will start with 'C' and data value inserted in the NAME should be upper case only.

so change the code there
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And one thing sir how will i further modify this code to hold maximum of 25 characters values only

Thanks
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch is an informal sort of place, where sir this and sir that is not necessary...and perhaps the cowgirls will think you don't want their answers.

Try google search with: oracle check constraint upper
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic