title: What is scope of temp table when called by nested stored procedure?
body: <p>This is two part question:</p>
  
  <ol>
  <li><p>I have two stored procedures: sp1 &amp; sp2.  If sp1 creates a temp table #temp then executes sp2 will I have access to #temp in the nested procedure?  If not, how to do it in another way?</p></li>
  <li><p>Can a function accept a parameter of type table? I tried but SQL Server give me an error. Why this can't work? Maybe sqlserver should support something like Generic.</p></li>
  </ol>