title: INSERTING a single field into a table, referenced from another table
body: <p>I need to insert a field in a that references an id field in another table.
  The id field it is to going is next to the field 'test' (column - codedescription, table typecategory) and coming from an id field next to the word 'assessment' (column categorydescription, table typecategory)</p>
  
  <pre><code>INSERT INTO codetype
  (typecategoryid)
  Where codedescription='test'
  SELECT id FROM typecategory WHERE categorydescription='Assessment Types'
  </code></pre>
  
  <p>There are plenty of examples of inserting entire columns but nobody has written how to insert a single field from another table.</p>
  
  <p>table - codetype
  id                  bigserial   primary key
  codedescription     varchar<br>
  typecategoryid      bigint foreign key to typecatogory on the ID column</p>
  
  <p>Table - typecategory
  ID                   big serial primary key
  categorydescription  varchar</p>