title: Redundant WHERE clause?
body: <p><strong>Question Background:</strong></p>
  
  <p>I have a simple stored procedure that has been edited by another developer. They have added an AND clause to some SQL where before there was a WHERE clause. The developer is now insisting the AND and WHERE clause must both be present.</p>
  
  <p><strong>The SQL:</strong></p>
  
  <pre><code>SELECT a.NOTIFICATIONID,
  a.NOTIFICATIONTYPE,
  a.DESCRIPTION,
  b.NOTIFICATIONID,
  b.SEEN,
  b.SEEN_DATE,
  b.PROFILEID
  FROM dbo.NOTIFICATIONS a
  LEFT JOIN dbo.NOTIFICATIONSTATUS b
  ON a.NOTIFICATIONID = b.NOTIFICATIONID
  AND b.PROFILEID = @profileId
  WHERE (b.PROFILEID = @profileId or b.PROFILEID is null)
  WHERE (b.DISMISSED = 0 or b.dismissed is null) 
  </code></pre>
  
  <p>From what I can see the AND and WHERE clause are doing in effect the same work. The join will automatically filter down on the PROFILE_ID if there is a match and the WHERE clause will do the same thing.</p>
  
  <p>Am I safe to assume that either the AND or the WHERE clauses are required, but not both?</p>