There might not be a performance penalty, this is a long ago practice
of mine from the wilds of SQL 6.5.  Also the syntax Mike used in MS
SQL syntax and not ANSI.  Not a big point since few people port SQL
code, but I also find the ANSI easier to understand when there is a
complex query wiht many tables.

This SQL site has some good stuff..
http://www.sql-server-performance.com/tuning_joins.asp


On Tue, 1 Feb 2005 22:08:57 -0600, Peter Brunone <[EMAIL PROTECTED]> wrote:
> 
> 
>        Interesting.  I had no idea there was a performance difference
> between the two (but then again, DB architecture isn't my forte).  Any
> recommended reading on this?
> 
> -----Original Message-----
> From: Dean Fiala [mailto:[EMAIL PROTECTED]
> 
> No, he's using the WHERE clause to perform the join.  It works, but it
> is a bad habit to get into,  and doesn't scale well (maintenance wise,
> and possibly performance wise) when used with a larger number of tables.
> 
> On Tue, 1 Feb 2005 21:16:38 -0600, Peter Brunone
> <[EMAIL PROTECTED]> wrote:
> >
> >
> >        Isn't he using an inner join already?
> >
> > -----Original Message-----
> > From: Dean Fiala [mailto:[EMAIL PROTECTED]
> >
> > Use an alias on at least one of the columns in your select statment,
> > that is what is causing the ambiguous column name.
> >
> > Also you would be better served using an inner join, though that is
> > not the issue.
> >
> > Select table1.username t1User, table2.username t2User
> > FROM table1 inner join table2 on table1.accountNum = table2.accountNum
> >
> > On Tue, 1 Feb 2005 16:48:19 -0500, Mike Appenzellar
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > I have a query with multiple tables, that being said there is the
> > > same
> >
> > > field in both tables...ex:
> > >
> > > Select table 1.username, table 2.accountNum
> > > FROM table 1, table 2
> > > WHERRE table 1.accountNum = table 2.accountNum
> > >
> > > table 1
> > > - id
> > > - accountNum
> > > - username
> > >
> > > table2
> > > - id
> > > - accountNum
> > > - name
> > >
> > > When I bind the query to a datagrid, I get "Ambiguous column name".
> > > Any ideas?
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to