title: why does Stored procedure not return the 'Out' parameter in bigquery?
body: <p>I am writing below Stored Procedure in BigQuery but not sure where did I do wrong.
  The 'Out' Parameter does not return anything.</p>
  <p>Stored Procedure:</p>
  <pre><code>create procedure if not exists test.GetNumTherapistSessions(
      in LastNamee string,
      out NumSessione int64
  )
  begin 
      select count(s.SessionNum) as NumSession from test.Session s 
      inner join test.Therapist t on s.TherapistID=t.TherapistID
      where t.LastName=LastNamee;
  end
  </code></pre>
  <p>and Here is how I declare the output parameter and how to call it:</p>
  <pre><code>declare NumSession int64;
  call test.GetNumTherapistSessions(&quot;Risk&quot;,NumSession);
  </code></pre>
  <p>Here is the output:
  <a href="https://i.stack.imgur.com/3s3yi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3s3yi.png" alt="enter image description here" /></a></p>
  <p>So far everything seems right, but when I select the NumSession, it returns Null:</p>
  <pre><code>select NumSession;
  </code></pre>
  <p>Output:
  <a href="https://i.stack.imgur.com/qqQqs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qqQqs.png" alt="enter image description here" /></a></p>