title: If any data duplicate then output show 1 if not then show 0 in SQL Server
body: <p>Table: <code>emp</code></p>
  
  <pre><code>id | name | sal
  ----------------
   1 | abc  | 100
   2 | ha   | 200
   1 | abc  | 100
   1 | abc  | 100
   1 | abc  | 100
   2 | ha   | 200
   2 | ha   | 200
   3 | hai  | 400
  </code></pre>
  
  <p>Based on this data I want give data duplicate or not in the table for that  status i out show output.</p>
  
  <p>I tried like this:</p>
  
  <pre><code>select  
      count(*) as status
  from 
      [Test].[dbo].[emp]
  group by
      [id], [name], [sal]
  having 
      count(*) &gt;= 1
  order by 
      count(*) desc
  </code></pre>
  
  <p>I get this output:</p>
  
  <pre><code>status
  4
  3
  1
  </code></pre>
  
  <p>I do not want get output like above way.</p>
  
  <p>I want show output like below</p>
  
  <pre><code>Status
      1
  </code></pre>
  
  <p>when data comes unique in table that time  <strong>status shows : 0 values.</strong></p>
  
  <p>1 means duplicate data and o means unique records.please tell me how to get singe status values to achive this issue.</p>