title: Which is the best practice to write sql
body: <p>Below two queries give same results.
  Just wanted to know which one is better in terms of performance.    </p>
  
  <p><strong>Query 1:</strong></p>
  
  <pre><code>SELECT N.*
  FROM   NOTIFICATIONS N
         JOIN NOTIFICATION_COMPANY_GROUPS NCG
            ON ( N.COMPANY_ID = NCG.COMPANY_ID
            AND N.ID = NCG.NOTIFICATION_ID )
         JOIN COMPANY_USER_GROUPS CUG
            ON ( N.COMPANY_ID = CUG.COMPANY_ID
            AND CUG.COMPANY_GROUP_ID = NCG.COMPANY_GROUP_ID )
         JOIN NOTIFICATION_PROPERTIES NP ON ( N.COMPANY_ID = NP.COMPANY_ID )
         JOIN COMPANY_USER_PROPERTIES CUP
            ON ( N.COMPANY_ID = CUP.COMPANY_ID
            AND CUP.PROPERTY_ID = NP.PROPERTY_ID )
  WHERE  N.COMPANY_ID = 2138
  AND    CUG.COMPANY_USER_ID = 41422
  AND    CUP.COMPANY_USER_ID = 41422;
  </code></pre>
  
  <p><strong>Query 2:</strong></p>
  
  <pre><code>SELECT N.*
  FROM   NOTIFICATIONS N
         JOIN NOTIFICATION_COMPANY_GROUPS NCG
            ON ( N.COMPANY_ID = 2138
            AND N.COMPANY_ID = NCG.COMPANY_ID
            AND N.ID = NCG.NOTIFICATION_ID )
         JOIN COMPANY_USER_GROUPS CUG
            ON ( CUG.COMPANY_USER_ID = 41422
            AND N.COMPANY_ID = CUG.COMPANY_ID
            AND CUG.COMPANY_GROUP_ID = NCG.COMPANY_GROUP_ID )
         JOIN NOTIFICATION_PROPERTIES NP ON ( N.COMPANY_ID = NP.COMPANY_ID )
         JOIN COMPANY_USER_PROPERTIES CUP
            ON ( CUP.COMPANY_USER_ID = 41422
            AND N.COMPANY_ID = CUP.COMPANY_ID
            AND CUP.PROPERTY_ID = NP.PROPERTY_ID );
  </code></pre>