title: How to insert joint account data for single bank account using oracle 11g
body: <p>I managed to add one customer on a multiple accounts (current,saving). But I am struggling to add more customers for a single account to make it Joint account. (One account can have more customers).</p>
  
  <p><strong>This is my account table</strong></p>
  
  <pre><code>create type account_type as object(
  accNum number,
  accType varchar2(15),
  balance number, 
  bID ref branch_type,
  inRate number,
  limitOfFreeOD number,
  custID ref customer_type,
  openDate DATE)
  /
  create table account_table of account_type(
  primary key (accNum))
  /
  </code></pre>
  
  <p><strong>This is customer table</strong></p>
  
  <pre><code>create type customerName as object(
  title varchar2(10),
  firstName varchar2(20),
  surName varchar2(20))
  not final
  /
  
  create type customerAddress as object(
  street varchar2(20),
  city varchar2(20),
  postCode varchar2(20))
  not final
  /
  
  create type custhomeContact as object(
  custHomephone varchar2(15))
  not final
  /
  
  create type customer_type as object(
  custID number,
  cName customerName,
  cAddress customerAddress,
  cHomeContact custhomeContact,
  /
  create table customer of customer_type(
  primary key (custID))
  /
  </code></pre>
  
  <p><strong>Here I am inserting values for a customer who have multiple accounts.</strong></p>
  
  <pre><code>insert into account_table
  select account_type('1001','current','820.50',ref(b),'0.030','800',ref(c),'01-May-11')
  from branch b, customer c
  where b.bID = '901'
  and c.custID = '1500';
  /
  
  insert into account_table 
  select account_type('1010','saving','2155',ref(b),'0.010','0',ref(c),'08-Mar-10')
  from branch b, customer c
  where b.BID = '906'
  and c.custID = '1500';
  /
  </code></pre>
  
  <p><strong>Here is the wrong attempt for joint account entry</strong></p>
  
  <pre><code>insert into account_table 
  select account_type('1002','current','2600',ref(b),'0.030','1000',ref(c),'10-Apr-13')
  from branch b, customer c
  where b.BID = '912'
  and c.custID = '1502'
  and c.custID = '1500';
  /
  </code></pre>
  
  <p>Any help? Thanks.</p>