On Thu, Jul 24, 2008 at 10:48 AM, Radek Valachovic <[EMAIL PROTECTED]>
wrote:

> Yeah I was reading in the forum this one, that using SELECT * is not good,
> can u explain why on short example? What is Pro and Cons what other type of
> security it gonna give me? Thanks
>

Not using SELECT * is more of a "best practices" kind of thing.

When you use it, you're potentially pulling more information than you need,
which is inefficient.  Additionally, specifying all of the columns you're
pulling is more self-documenting.

I'd much rather see:

SELECT
     u.userName
     , u.userPhone
     , u.userEmail
     , u.userAddress
FROM
     Users u
WHERE
....

than

SELECT * FROM Users

with the former, I have a better idea of what i'm dealing with (without the
need to <cfdump> the query and see it).


-- 
A byte walks into a bar and orders a pint. Bartender asks him "What's
wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I thought
you looked a bit off."


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309637
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to