Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

order of condition is important

 
Guddu Ali
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SELECT EMP.EMPNAME,EMP.EMPID,
EMP.EMPDEPID,DEPT.DEPTID
FROM EMPLOYEE EMP,DEPARTMENT DEPT
WHERE EMP.EMPDEPID=DEPT.DEPTID;

Here in where clause is the order of condtion ie
EMP.EMPDEPID=DEPT.DEPTID
or
DEPT.DEPTID = EMP.EMPDEPID
Is important ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The database will optimize your query the same way regardless of which order you type those in.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic