From: Dan Nelson Date: August 29 2005 6:07am Subject: Re: why is this not an error? List-Archive: http://lists.mysql.com/mysql/188395 Message-Id: <20050829060711.GI88693@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Aug 29), Jason Pyeron said: > Why is this not an error? > > mysql> select count(*) paths; > +-------+ > | paths | > +-------+ > | 0 | > +-------+ > 1 row in set (0.00 sec) Why should it be? You've simply omitted the optional AS keyword in a standard no-table SELECT query. There's no table in the query, so count(*) returns 0 (I suppose you could argue it should return NULL), and you've renamed the column, so that's why MySQL calls it "paths" in the output. It's no different from SELECT version() v; +--------+ | v | +--------+ | 4.1.12 | +--------+ 1 row in set (0.00 sec) -- Dan Nelson dnelson@stripped