•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 402,686 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,394 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 427 | Replies: 3
•
•
Join Date: Nov 2007
Posts: 107
Reputation:
Rep Power: 1
Solved Threads: 0
from last thread, I figured it out my tables relationship and they do work i believe. however, i can't successfully get elements from each of the table out. if i do:
select b_customer_name, h_customer_firstname, h_customer_lastname, telephone
from customers c, business_customers b, home_customers h
where c.customer_id = b.b_customer_id and
c.customer_id = h.h_customer_id;
i have no row selected.... what is wrong ?
select b_customer_name, h_customer_firstname, h_customer_lastname, telephone
from customers c, business_customers b, home_customers h
where c.customer_id = b.b_customer_id and
c.customer_id = h.h_customer_id;
i have no row selected.... what is wrong ?
sql Syntax (Toggle Plain Text)
--customers DROP TABLE Customers cascade constraint; CREATE TABLE Customers( Customer_id Number(5) PRIMARY KEY NOT NULL, Credit varchar2(20), Street varchar2(20), City varchar2(12), State varchar2(2), Zip varchar2(5), Telephone varchar2(14)); --business_customers DROP TABLE business_customers cascade constraint; CREATE TABLE business_customers( b_customer_id number(5) PRIMARY KEY NOT NULL, b_customer_name varchar2(20), FOREIGN KEY (b_customer_id) REFERENCES Customers(customer_id)); --home_customers DROP TABLE home_customers cascade constraint; CREATE TABLE home_customers( h_customer_id number(5) NOT NULL, h_customer_lastname varchar(10), h_customer_firstname varchar(10), PRIMARY KEY (h_customer_id), FOREIGN KEY (h_customer_id) REFERENCES Customers(customer_id));
Last edited by peter_budo : Apr 17th, 2008 at 1:49 pm. Reason: Correcting [code = sql] tag, there are no spaces for [code=sql]
•
•
•
•
•
•
•
•
DaniWeb Oracle Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Oracle Forum
- Previous Thread: Trigger help
- Next Thread: How to get in true Oracle



Threaded Mode