aspose file tools*
The moose likes JDBC and the fly likes Please solve this query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Please solve this query" Watch "Please solve this query" New topic
Author

Please solve this query

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29247
    
139

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.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
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
Bartender

Joined: Oct 14, 2005
Posts: 18129
    
    8

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

Joined: Oct 25, 2005
Posts: 216
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

Joined: Oct 25, 2005
Posts: 216
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

Joined: Oct 10, 2000
Posts: 1364
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

Joined: Oct 25, 2005
Posts: 216
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please solve this query
 
Similar Threads
SQL Exception Error
NX: Client Search Requirements
NX: URLyBird 1.3.2. Question about the process of booking.
HI I got the null pointer exception using session factory
SQL query