WinSQL » Knowledge base

Document information

Document ID:780
Subject:Example of using OUTER JOINS
Creation date:7/29/09 3:24 PM
Last modified on:7/29/09 3:24 PM


Details


Many back-end databases support OUTER JOINS. However, the syntax is quite different from one database to another. If you are not sure what is the correct syntax used by your back-end server, you can use a generic syntax that will work with any database.

Consider the following query. select EMP.ENAME
from {oj SCOTT.DEPT DEPT LEFT OUTER JOIN SCOTT.EMP EMP ON DEPT.DEPTNO = EMP.DEPTNO }

The above query uses a generic format that can be used by any ODBC client, including WinSQL. This generic format is converted into database specific format by the ODBC driver before sending it to the database.

Any generic query can be converted in to its native format by highlighting the query, clicking the right mouse button and selecting Get native SQL from the pop-up menu.




User comments

Posted by Anonymous on 7/8/10 4:13 AM

select EMP.ENAME from {oj SCOTT.DEPT DEPT LEFT OUTER JOIN SCOTT.EMP EMP ON DEPT.DEPTNO = EMP.DEPTNO }


Add a comment to this document

Do you have a helpful tip related to this document that you'd like to share with other users? Please add it below. Your name and tip will appear at the end of the document text.
Your name:
Your email:
Hide my email address
Verification code:
Enter the verification code you see above more submitting your tip
Tip:Please limit tips to 1000 characters

Navigation

Social Media

Powered by 10MinutesWeb.com