aspose file tools*
The moose likes JDBC and the fly likes order of condition is important Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "order of condition is important" Watch "order of condition is important" New topic
Author

order of condition is important

Guddu Ali
Greenhorn

Joined: Jul 18, 2012
Posts: 21
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

No. The database will optimize your query the same way regardless of which order you type those in.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: order of condition is important