title: Can I create column with header name according to values in another table?
body: <p>This is my first question here and please excuse me, if my question looks wired. I am totally new to programming and SQL though I have some knowledge in ms access database.</p>
  
  <p>I have created two tables <code>OrdersTabel</code> and <code>OrderedItems</code>. Then I want to create another table <code>OrderFullDetails</code> as in the screenshot here:</p>
  
  <p><img src="https://i.stack.imgur.com/CTt1R.png" alt="table Picture"></p>
  
  <p>I want to create <code>OrderFullDetails</code> table as follows.</p>
  
  <ol>
  <li><p>Contains in <code>Item</code> column in <code>OrderedItem</code> table should create separate column in <code>OrderFullDetails</code> table by its names.</p></li>
  <li><p>If a column already exists in <code>OrderFullDetails</code> table equal to Item name in <code>OrderedItem</code> table, only the <code>Qty</code> value should be entered to the matching column according to OrderNo. And if there is no column matching, it should create a new column.</p></li>
  </ol>
  
  <p>Your help will be million worth to me. </p>
  
  <p>Thanks</p>