Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 175

Table of Contents

Advertisement

If the join column is made up of more than one column, the combination of the
values must be unique on the "one" side. For example, in the
database, the
in the
id
customer
each contain a customer ID. The
customer and, therefore, has a unique value in the
table contains one row for each transaction a customer has made.
sales_order
Presumably, there are many transactions for each customer, so there are
multiple rows in the
sales_order
column.
So, if you join
customer.id
to-many. As you can see in the following example, for every row in
there are potentially many matching rows in
select sales_order.id, sales_order.cust_id,
customer.lname
from sales_order, customer
where sales_order.cust_id = customer
id
cust_id
2583,101,101,'Devlin'
2001,101,101,'Devlin'
2005,101,101,'Devlin'
2125,101,101,'Devlin'
2206,101,101,'Devlin'
2279,101,101,'Devlin'
2295,101,101,'Devlin'
2002,102,102,'Reiser'
2142,102,102,'Reiser'
2318,102,102,'Reiser'
2338,102,102,'Reiser'
2449,102,102,'Reiser'
2562,102,102,'Reiser'
2585,102,102,'Reiser'
2340,103,103,'Niedringhaus'
2451,103,103,'Niedringhaus'
2564,103,103,'Niedringhaus'
2587,103,103,'Niedringhaus'
2003,103,103,'Niedringhaus'
2178,103,103,'Niedringhaus'
2207,103,103,'Niedringhaus'
CHAPTER 4
Adaptive Server IQ Indexes
table and the
cust_id
table contains one row for each
customer
id
table with the same value in the
to
, the join relationship is one-
sales_order.cust_id
sales_order
id
lname
asiqdemo
in the
table
sales_order
column in each row. The
cust_id
,
customer
.
155

Advertisement

Table of Contents
loading

Table of Contents