[ic] SQL Statements

Jason Kohles interchange-users@interchange.redhat.com
Thu Nov 29 11:48:01 2001


On Thu, Nov 29, 2001 at 05:33:27PM +0000, joachim.richter wrote:
> I have seen both version of the following 2 lines, is there a difference ?
> The fields that are named in the first line are also the ones which are 
> in the output list - 
> 
> select sku, description, price from products where price < '50.00'
> select * from products where price < '50.00' 
> 
As long as the fields in the products database are sku, description, and
price, in that order, then these are the same, the first form is preferred
if there is the possibility that other fields may be added to the database,
or that the order of fields may change, as it ensures that you are getting
the fields you expect...

-- 
Jason Kohles                                 jkohles@redhat.com
Senior System Architect                      (703)786-8036 (cellular)
Red Hat Professional Consulting              (703)456-2940 (office)