• Post Reply Bookmark Topic Watch Topic
  • New Topic

order of condition is important  RSS feed

 
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: 36864
481
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!