Results 1 to 3 of 3

Thread: Join SQL Traditional or ANSI

  1. #1
    Join Date
    Feb 2008
    Posts
    2,180

    Join SQL Traditional or ANSI

    What is good and what is wrong between:

    Code:
    select * 
    from x inner join y on x.id = y.id
    and

    Code:
    select * from x, y 
    where = x.id y.id
    and especially why

    As Personal I think the 1 is much better because:
    - It clarifies the notion of join: where its only for my filters, not for the bullshit to join
    - Join if the word is there is a reason. it's like for the replacement of C while + if/then. it works the same, but why not use for?

    I objected:
    - It is more compact
    - (A little bad faith assumed I think) Method 1 is that of those who left to join wrong and nothing to understand, the 2 is the method of "true"

    So, what do you do?

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Join SQL Traditional or ANSI

    I prefer the latter approach because I find it much more readable and understandable, especially when the joints are more complicated than in the case which is easy here. One advantage among others is found immediately behind the tables involved the word From, instead of seeking the names of the tables scattered in the middle of a lot of bla bla. But there are many programmers who love the bla bla. This is not my case. The second form is direct, simple, readable. It suits me a thousand times better than the first.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Join SQL Traditional or ANSI

    I started by Method 2, and people I had explained that it was the super (+) oracle of all that, but since 1 year I am completely well spent. Personally I find the join statement with much more readable when you cross a dozen tables and filters are added it becomes the complete laying in where, and I must be stupid but I put more than 5x time to understand a request or is in the where.

    To the left join it is also stupid, doing a left join if they are needed and it is often very useful, and allows Oracle to make it in both modes of writing, on the other hand if we must speak of half join, it's very easy to make a cross join because we forgot to link two tables in the where in a complex query, whereas with the method we will have a ansi syntax error and I like good idea.

Similar Threads

  1. Replies: 3
    Last Post: 02-06-2012, 12:44 PM
  2. How to use ANSI.SYS in Windows 7
    By NamJam in forum Operating Systems
    Replies: 3
    Last Post: 23-12-2010, 07:22 AM
  3. Replies: 1
    Last Post: 16-07-2010, 12:27 PM
  4. Ansi.sys and Windows XP issue
    By AMISH in forum Windows Software
    Replies: 3
    Last Post: 13-07-2009, 07:07 PM
  5. Convert UTF-8 to ANSI
    By DotNetUser in forum Software Development
    Replies: 2
    Last Post: 04-04-2009, 10:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,612,557.25244 seconds with 17 queries