Sei sulla pagina 1di 4

15/8/2019 Oracle Proprietary vs.

ANSI-99 Joins | My Oracle 10g Tips


Más jrquinte@gmail.com Escritorio Cerrar sesión

Funny Quote of the Day


We can lick gravity, but sometimes the paperwork is Wednesday, July 13, 2011
overwhelming. Oracle Proprietary vs. ANSI-99 Joins
Wernher von Braun
more Funny Quotes

 Oracle Proprietary Joins ANSI-99 SQL Joins


To display only rows with matching Keys

"Equi-Join" aka "Simple Join" aka "Inner Join" “Natural Join”


The WHERE clause states how to join the tables Can't use aliases
Use AND to specify other conditions (i.e., AND City =
Popular Posts 'DC') 1) Key Name and Type are the same
Row_Number() Over Partition By Select Key, NameL, NameR
Select L.Key, NameL, NameR
Timestamp in an External Table From TableL
From TableL L
NATURAL
Remove Line Breaks from Data , TableR R
JOIN TableR;
Flashback a Table, Index and Trigger Script WHERE L.Key = R.Key;
Calculate Table Size 2) Key Name Same, Different Type
Java - A Way to Manually Sort an Array
Select Key, NameL, NameR
To Run a SQL Query From a DOS Batch File
From TableL
Create Synonyms for Entire Schema JOIN TableR
Partition By Null USING (Key);
Sum Multiple Columns Based on Conditions
3) Different Key Names
Select Key, Key3, NameL, Name3
My Other Blogs From
JOIN
TableL
Table3
HTML for Blogs ON (Key = Key3);
Java
Learning Big Data "Non-Equi-Join": Keys are >, <, or BETWEEN
Perl
Unix Notes Select L.Key, R.Key Select L.Key, R.Key, NameL, NameR
, NameL, NameR From TableL L
From TableL L JOIN TableR R
, TableR R ON (l.Key > r.Key);
Where L.Key > R.Key;

Joining More Than 2 tables

There is always one less WHERE/AND clause than there USING when names are the same.
_User (1) /*+ (1) 11g (2) 9i (1) Accept (4) Active Sessions (1) All_Catalog (1) are tables to join.  ON when names are different
Alpha (2) Alter (1) Alter Session (1) Amper-Variables (2) Analytic Functions (1)
ANSI (1) Approx_Count_Distinct (1) Approximate (1) ASCII (1) Attribute (1) (3 tables = 2 clauses, etc) Select Key, NameL, NameR, Name3
From TableL L
Backup (2) Backups (1) Bind (1) Blog (1) Bottom-n (2) Break (4) By (1) Calendar -----------
Select Key, NameL, NameR, Name3
(1) Called (2) Cartesian Join (1) Cartesian Merge (1) Case (7) Character (1) From TableL l Join TableR
, TableR r Using (Key)
Check Constraint (1) Chr(10) (3) Class (1) Clob (1) Cluster (1) Colsep (1) Column -----------
, Table3 t
(3) Column_name (4) Comment (1) Compute (4) Conditional Call (1) Conditional Where l.Key = r.Key Join Table3
On (l.Key = Key3);
Prompt (1) Conditional Spool (1) Connect by (6) Connection (2) Constraints (4) And l.Key = t.Key
Context (2) Control (1) Controlfile (1) Correlated Subquery (4) Count (4)
Count Rows (1) Create (1) Create Table (3) Cross Join (1) CSV (2) CTXCat (1) To see unmatched rows “Right Outer Joins”
Cube (1) Cumulative Count (1) Cumulative Sum (1) CurrVal (1) Data Block (1) Data
Dictionary (2) Data Pump (2) Database (3) Datafile (1) Dates (8) DBF (1) Select L.Key, NameL, NameR Select Key, NameL, NameR
From TableL L From TableL
Dbms_Rls (1) Dbms_Session.Set_Context (1) DCBA (1) DCL (1) DDL (2) Debug (1)
, TableR R RIGHT OUTER
Decode (2) Define (3) Delete (4) Dense_Rank (2) Disable (1) Discrepancies Where L.Key(+) = R.Key ; JOIN TableR
(2) Distinct (2) Distinct Count (2) DML (2) Documentation (3) DOS (3) Using (Key);
(Think of "Add rows to the left side so we see a full set of
Drop (2) Dump (1) Duplicates (2) Elapsed (1) Enable (1) Enterprise Manager (1)
records on the right.")
Entity (1) Entmap (1) Equi-Join (1) Escape (1) Excel (1) Exceptions (1) Execute
Immediate (1) Exists (2) Exponentiation (1) Extent (1) External Tables (6) Fast To see unmatched rows: “Left Outer Join”
(1) Feedback (1) Fetch (2) First (1) Flashback (3) Flat File (1) From (2)
Functions (1) Fuzzy (1) Gb (1) Generating Code (9) Gigabyte (1) Global Select L.Key, NameL, NameR Select Key, NameL, NameR
Temporary Table (3) Grant (3) Group By (2) Grouping (1) Grouping Sets (3) From TableL L From TableL
, TableR R LEFT OUTER
Having (1) Heading (1) Hex (1) Hierarchy (3) Hints (1) HR (2) HTML (9) In (2) Where L.Key = R.Key(+); JOIN TableR
Index (2) Inline View (2) Inner Join (1) Insert (4) Instance (3) Instr (1) Using (Key);
iSql+ (1) Java (10) Join (8) Keep (1) Kill session (1) Labels (1) Lag (1) Last (1)
(Think of "Add rows to the right side so we see a full set of
Layout (1) Lead (2) Leading Zeros (1) Leap Year (1) Length (1) Level (1) Linebreak
records on the Left.")
(1) Linking Tables (1) Locks (2) Logfile (2) Logical (1) Logical vs. Physical (1)
To see all unmatched rows "Full Outer Join"
Login.sql (2) Long (2) Loop (3) Lpad (2) Mailing Labels (1) Max (2) Menu (1)
Merge (1) Min (1) Minus (1) Mod (1) Modeler (1) Modify (1) Multitable Insert (2) Oracle doesn’t have a full outer join.
Select l.Key, r.Key, NameL, NameR
Named Parameters (1) New_Value (4) NextVal (1) NoPrint (1) Null (3) NullIf (1) From TableL L
FULL OUTER
NVL (2) Object (1) Object Oriented (1) Offset (2) On Report (1) ORA- (1)
JOIN TableR R
Oracle (140) Order by (4) Order Siblings by (1) Outer Join (4) on (l.Key = r.Key);

Over (1) Parameter (1) Partition (2) Partition By (12) Percentage (1)
Performance (1) Phone (1) Physical (1) Pivot (3) PL/SQL (4) Pls_Integer (1)
Positional Parameters (1) PRD (1) Privileges (3) Procedures (1) Process (1) Profile CROSS JOIN is the ANSI name for Oracle's Cartesian Product -- Don't do this no matter what you call it.
Posted by Lynn Tobias at 10:35 AM
(1) Prompt (1) Punctuation (1) Q-Quote (2) Quote (1) Rank (2) Recycle Bin (2)
Labels: ANSI, Cartesian Join, Cross Join, Equi-Join, Inner Join, Join, Outer Join
Refcursor (1) RegExp (3) RegExp_Count (1) RegExp_Instr (1) RegExp_Substr (1)
Rename (1) RepHeader (1) Reserved Words (1) Reverse Engineer (1) Revoke (1) Role
(1) Rollback (1) Rollup (3) Round (1) Row_Number() (1) Rowid (1) Rownum (3) No comments:
Sample (1) Sandbox (1) Schemas (5) SCN (1) Scott (1) Segment (1) Select (1)
Self-Join (2) Sequence (2) Series (1) Session_User (1) Sessions (2) Set (1)

my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html 1/4
15/8/2019 Oracle Proprietary vs. ANSI-99 Joins | My Oracle 10g Tips
SGA (1) Simple_Integer (1) Single Quotes (1) Size (1) Slow (1) Soundex (1) Spool Post a Comment
(2) SQL (127) SQL Developer (1) SQL*Loader (1) SQL*Plus (5) Start
(1) Start With (1) Stop (1) Storage (2) Store (1) Subquery (1) Substr (2)
Subtotal (1) Sum (3) Synonym (1) Sys_Context (1) Sysdate (1) System Change Enter your comment...
Number (1) System Privileges (1) Table (4) Table_Name (3) Tablespace (2)
TCL (1) Template (1) Term (1) Text (1) Thanks (5) Time (2) Timestamp (1) Title
(1) To_Char (2) To_Date (1) To_Lob (1) Top-n (2) Total (1) Translate (4)
Trigger (2) Trim (1) Trunc (1) Truncate (1) Ttitle (1) UAT (1) Unbounded
Preceding (1) Underscores (1) Union (1) Unique (1) Update (2) User (5)
Comment as: jrquinte@gmail Sign out
User_Tab_Columns (1) UserEnv (1) Variables (6) Verify (1) Version (1) View (1)
Virtual Private Database (2) Virtual Table (2) VPD (2) WHEN (1) Where (4)
Windowing (1) With (3) Word (1) XP (1) Publish Preview Notify me

Links to this post

Create a Link

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

Great explanation of ChiRunning

Question about PL/SQL?

Ask PL/SQL expert Dan Clamage

Neat and Interesting Links


Oracle Documentation Library 11g (11.2)
Oracle® SQL Reference 10g Release 2
Oracle® SQL*Plus® User's Guide and Reference Release 10.2
SQL FAQs
Help Desk - Christopher B. Wright webcomic

Notepad2 - Notepad to the nth degree!

Download free from CNET

Blogger Blogs
The Real Blogger Status
"BlogSpot" Blogs Cannot Be Shared, Using
"www" - We're seeing a number of reports
from blog owners, claiming their blogs are now
subject to security alerts - and blocked when
sharing. Frequently, the repo...

9 months ago

Blogger Tips and Tricks


How to get URL of commentator - We sometimes get
questions about how to get the web address/URL of a
commentator in our blog. Blogger.com has not provided any way
to do that. However, the...
1 year ago

Known Issues for Blogger


- We're aware of the issue preventing the post editor from
loading for some users. Our team is investigating this right
now and we hope to have this sorted o...
8 years ago

my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html 2/4
15/8/2019 Oracle Proprietary vs. ANSI-99 Joins | My Oracle 10g Tips
Don't loose this note: 11g SQLPlusW
http://forums.oracle.com/forums/thread.jspa?threadID=583263
user5203135
1) copied sqlplusw.exe from oracle10g to product\11.1.0\db_1\BIN\
2) create a copy of oraclient11.dll and rename it to oraclient10.dll

Award winning diagramming tool

Try free for 30 days

Subscribe To My Blog
Posts

Comments

About Me
Lynn Tobias
Washington, DC
I've been in IT almost since birth. I've done many things with
many languages and operating systems, but finally found a home
when I started learning Oracle.

SQL is just plain fun when you're trying to resolve a puzzle.


Always searching in the books for that new function or statement,
I was able to get certified in 9i SQL.

I took a hiatus from it all for personal reasons, but I'm back in
college and am currently studying Database Administration with
plans of getting certified.

Want to drive me crazy? Tell me you can't do that in SQL.


Anyway, hope you enjoy the blog.
View my complete profile

God Bless America

OBX 7/4/07

Blog's I Follow:
The Tom Kyte Blog
Upcoming Events... - I took some time off from the road at
the beginning of 2014 - getting ready to get back on the road
again, lots of trips scheduled from February till the e...
5 years ago

Dan's Oracle Tips and Ruminations


Non-Printable Characters - One of our vendors rejected a file
we sent them because it had an non-printable ASCII
character in it (one record out of tens of thousands). Once I
tracked...
7 years ago

Powerful screen capture tool

Oracle Certified Professionals


ORACLE CERTIFIED PROFESSIONALS
A secret treasure house of Oracle books - One
of the most prolific publishers of Oracle
technology and application books - *Packt
Publishing *just published its 1000 cover. Packt
books are written ...

6 years ago

Need a favicon for your site/blog?

my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html 3/4
15/8/2019 Oracle Proprietary vs. ANSI-99 Joins | My Oracle 10g Tips

Walk for Autism Virginia

Help raise awareness about the increasing


frequency of autism and fund educational
scholarships.

Compare text files with ExamDiff

Free from SnapFiles

Me and my baby sister after running at


WDW.

Invisible Web Tracker

A free yet reliable, highly configurable hit counter and real-time


detailed web stats.

Running Blogs
Jeff Galloway's Blog
Check out the NEW Jeff Galloway Blog - Run over to
http://www.jeffgalloway.com/blog/ to check out the latest
posts!
1 year ago

Runner's World Daily Views


-

Want to go raw?

my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html 4/4

Potrebbero piacerti anche