Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Code factory

by Anonymous Monk
on Jul 08, 2003 at 18:28 UTC ( #272377=note: print w/replies, xml ) Need Help??


in reply to Re: Code factory
in thread Code factory

A note on select *. In some db's, you can do subselects with select * that increase maintainability. You can get things like:
select drink.id, drink.name from ( select * from beverage where type = ? ) drink
now mind you, it may not be as efficient as explicitly doign every single column, but if the sub query produces negligible data-size difference (in bytes) then you can definitely get away w/ it and have virtually no performance difference.

Granted, this query can be rewritten so that it doesn't use a subquery, but subqueries are a feature that is needed sometimes. This is just merely an example showing only the features of a subselect and select * :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://272377]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2018-04-27 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?