title: List all the stored procedures which have no parameters
body: <p>I want to find out which stored procedures in a database have no parameters. I tried these but I am not sure:</p>
  
  <p>1) Joining tables <code>sys.all_parameters</code> and <code>sys.all_objects</code>:</p>
  
  <pre><code>select 
     ao.name,ao.type, ao.type_desc
  from 
     sys.all_parameters pa
         left outer join 
     sys.all_objects ao
         on pa.object_id = ao.object_id
  where 
      pa.name like ''
  and 
      ao.type not in ('FN','AF','FS')
  </code></pre>
  
  <p>2) From table <code>information_schema.parameters</code>:</p>
  
  <pre><code>select * 
  from
      information_schema.parameters 
  where 
      parameter_mode not in ('in', 'out', 'inout')
  </code></pre>
  
  <p>3) From <code>information_schema.parameters</code>:</p>
  
  <pre><code>select * 
  from
      information_schema.parameters 
  where
      parameter_name like ''
  </code></pre>
  
  <p>However, I am not entirely sure if any of these are correct. Is there something a direct way?</p>
  
  <p>Maybe something like:</p>
  
  <pre><code>select * from sys.procedures where xtype = 'P' and has_parameters=0
  </code></pre>