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 ?
--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));