Q

Difference between select query and JOIN

What is the difference between a query like select a.field1,b.feild2 from Table1 a,Table2 b where a.id=b.fk_code and using JOIN?

What is the difference between a query like select a.field1,b.feild2 from Table1 a,Table2 b where a.id=b.fk_code and using JOIN?
In Oracle, I can write a query similar to the following:
SELECT a.field1, b.field2
FROM table1 a, table2 b
WHERE a.id=b.fk_code;
The above will join two tables together on the defined join condition (the WHERE clause). One of the criticisms of Oracle was that the join syntax above is not compliant with the widely accepted ANSI SQL standard syntax. An ANSI-compliant join statement similar to the above will look like the following:
SELECT a.field1, b.field2
FROM table1 a INNER JOIN table2 b
     ON a.id=b.fk_code;
The two statements will return identical results. A developer who creates applications for Oracle and other ANSI-compliant database platforms can now use the same syntax in each. ANSI-compliant joins were first available in Oracle 9i.
This was last published in February 2007

Dig Deeper on Oracle and SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close