Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: DBI problem on fetchrow

by jZed (Prior)
on Nov 15, 2007 at 17:36 UTC ( #651033=note: print w/ replies, xml ) Need Help??


in reply to Re: DBI problem on fetchrow
in thread DBI problem on fetchrow

That part of what the OP is doing is ok. "M" is being used as a table alias. SQL syntax supports table aliases either with or without the optional keyword "AS", so these two are the same, they both let you refer to "Regions" as "M":

SELECT M.foo FROM Regions AS M; SELECT M.foo FROM Regions M;


Comment on Re^2: DBI problem on fetchrow
Download Code
Re^3: DBI problem on fetchrow
by Jenda (Abbot) on Nov 15, 2007 at 17:55 UTC

    As a matter of style I would recomend using the "as" consistently. It reads better.

    BTW, "Regions as M"? Maybe there is a reason to use M for the Regions table, but I would expect R or (in case the table was used several times in the query) something like R_old, R_new, R1, R2, .... In either case I do not see why would you use an alias in a query that only includes one table. I guess a matter of style again :-)

      I agree. I always use AS.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-07-25 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls