title: Sql server temp table
body: <p>I need to create a temp table who contains the number of employes of each department. If the department have no employer, we need to print a message.</p>
  <pre><code>IF (count(*) = 0) 
      BEGIN
      PRINT 'Espace vide'
      END
      else 
      Select deptno,count(*)  
      from emp    
      group by deptno;
  </code></pre>
  <p>this is the query to see how many employes are in each dept, but I don't know how to create a temp table with it.</p>