title: T-SQL stored procedure returns table
body: <p>How do I make a T-SQL stored procedure that returns the (tabular) result of this SELECT statement:</p>
  
  <pre><code>USE automation
  
  SELECT insurer.name,
  insurer.case_name,
  contact.name,
  contact_address.line_1,
  contact_address.city,
  state.state_abbr,
  contact_address.zip
  
  FROM person as insurer
  
  INNER JOIN persons_relationship on persons_relationship.person2_id = insurer.person_id
  INNER JOIN person contact on contact.person_id = persons_relationship.person_id
  INNER JOIN person_address contact_person_address on contact_person_address.person_id = contact.person_id
  INNER JOIN address contact_address on contact_address.address_id = contact_person_address.address_id
  INNER JOIN state on state.state_id = contact_address.state_id
  
  insurer.person_class_id = 2
  </code></pre>