DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: ANSI SQL - joins

  1. #1
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    Hi all, the ANSI SQL version for a join goes like this :

    Table1 A LEFT OUTER JOIN Table2 B on (B.ID2 = A.ID1)

    I am not able to use this syntax in Oracle. Does Oracle not support the ANSI SQL standards ?

    Shiva.

  2. #2
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282

    I believe it is

    select mnemonical_col
    from table1 a, table2 b
    where a.ID1 (+) = b.ID2


    ---
    Every DBMS supports ANSI SQL standards, but there are a few changes with some DBMS.


    F.

  3. #3
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Originally posted by rshivagami

    I am not able to use this syntax in Oracle. Does Oracle not support the ANSI SQL standards ?
    Oracle support the ANSI SQL standards. U can see ANSI syntax in Oracle here:
    http://download-east.oracle.com/otnd...03.htm#2065648

  4. #4
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    I want to write a query which can talk both to Oracle & SQL Server database - if the ANSI standard requires modifications as per the DBMS , then how to go about creating database independent queries, especially with joins ?

    SQL syntax is like "*=" & "=*" whereas oracle has "a.name1 = b.name1(+)" . How do we go about generalizing the two ?

    Thanks,
    Shiva.

  5. #5
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282


    I have never used SQL Server. About syntax, I believe we dont go generalizing the two ones, we go rewriting them

    Once SQL syntax depends on the DBMS, they are not independent.


    F.

  6. #6
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282


    I have never used SQL Server. About syntax, I believe we dont go generalizing the two ones, we go rewriting them

    Once SQL syntax depends on the DBMS, it is not independent. Besides, SQL ANSI is always getting developed, changing to better, and not all DBMS has the new features. So, the syntax may be different even with the same DBMS - in different versions.


    F.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width