[ic] SQL Statements

Michelle Wilant interchange-users@interchange.redhat.com
Thu Nov 29 23:34:01 2001


Correct.  Just want to note though that if we assume that the products database
that comes with interchange is used then the * wouldn't be as fast.  It will
bring all the data in the products table into memory, creating unnecessary
overhead.  I'm all for encouraging everyone to learn sql -- mysql being my
personal favorite. :)

Never quit learning :)
Michelle

Jason Kohles wrote:

> 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)
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users