Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 23-04-2009
Join Date: Feb 2008
Posts: 2,180
Join SQL Traditional or ANSI

What is good and what is wrong between:

select * 
from x inner join y on x.id = y.id

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?
Reply With Quote
Old 23-04-2009
Join Date: Jan 2008
Posts: 1,515
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.
Reply With Quote
Old 23-04-2009
Join Date: May 2008
Posts: 2,383
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.
The FIFA Manager 2009 PC Game
Reply With Quote

  TechArena Community > Software > Software Development
Tags: , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Join SQL Traditional or ANSI"
Thread Thread Starter Forum Replies Last Post
Can?t join friends in Max Payne 3, error "Join Failed Failure: Blacklisted. G.Kahli Video Games 3 02-06-2012 12:44 PM
How to use ANSI.SYS in Windows 7 NamJam Operating Systems 3 23-12-2010 07:22 AM
Programming in ANSI C by E Balagurusamy free download Mr Alfa Ebooks 1 16-07-2010 12:27 PM
Ansi.sys and Windows XP issue AMISH Windows Software 3 13-07-2009 07:07 PM
Convert UTF-8 to ANSI DotNetUser Software Development 2 04-04-2009 10:44 PM

All times are GMT +5.5. The time now is 11:54 PM.