Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How make relatioship between tables

Re: How make relatioship between tables

From: Joel Garry <joelga_at_pebble.org>
Date: Fri, 05 Jun 1998 23:58:11 GMT
Message-Id: <slrn6nh1om.kjo.joelga@pebble.org>


On Tue, 02 Jun 1998 13:33:01 GMT, mmastell_at_my-dejanews.com <mmastell_at_my-dejanews.com> wrote:
>i have to make a database with tables that must be in relation, but
>i don't know SQL statement to do this!!!!
>
>Please help me!!!
>I you know a www site that speak about SQL statement let me know
> Thanks
> Marco

See www.orafaq.org.

The relation is made in the where clause, and can be enforced with constraints.

If you have table CUSTOMER with fields CUSTOMER_NUMBER, NAME and ADDRESS, and table ORDER with fields ORDER_NUMBER, CUSTOMER_NUMBER, ITEM, you can relate the tables with
select CUSTOMER.CUSTOMER_NUMBER, CUSTOMER.NAME, ORDER.ORDER_NUMBER, ORDER.ITEM from ORDER, CUSTOMER
where CUSTOMER.CUSTOMER_NUMBER = ORDER.CUSTOMER_NUMBER;

If your DBA has allowed help, say HELP CREATE TABLE from your SQL> prompt.

>
>P.S. mail-me at :
>mmastell_at_inf.unitn.it
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading

--
These opinions are my own and not necessarily those of Information Quest

or Pebble In The Sky                     http://www.informationquest.com

http://ourworld.compuserve.com/homepages/joel_garry jgarry@nospameiq.com
"See your DBA?"  I AM the @#%*& DBA!     Remove nospam to reply.  Sorry.
Received on Fri Jun 05 1998 - 18:58:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US