Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

I hate to be picky...

by Shoeboy (Sexton)
on Jul 04, 2000 at 03:20 UTC ( [id://20962]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI vs MLDBM/GDBM_File
in thread DBI vs MLDBM/GDBM_File, etc.

But this is a religious issue with me. As long as the RDBMS supports it, you should use ANSI 92 join syntax. And you should use table aliasing as well. So your query ought to be written as
select st.supplier from supplier_table as st join supplier_item_xref as six on st.id = six.supplier_id join item_table as it on six.item_id = it.id where it.item in ('screw', 'stereo');
This allows the SQL optimizer to do a better job and can result is faster code for complex joins. If your RDBMS doesn't support this, upgrade. It makes your code more readable. --Shoeboy
I'm not wearing any pants

Replies are listed 'Best First'.
RE: I hate to be picky...
by davorg (Chancellor) on Jul 04, 2000 at 12:11 UTC

    You're right, of course (about the join syntax - I really can't comment on the pants!) but there are a number of old timers like me who have been using the older syntax for far too long and will take some getting used tto these new-fangled ideas :-)

    --
    <http://www.dave.org.uk>

    European Perl Conference - Sept 22/24 2000
    <http://www.yapc.org/Europe/>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://20962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-23 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found