Question.

Posts   
 
    
netLearner
User
Posts: 150
Joined: 18-Oct-2003
# Posted on: 16-Aug-2004 17:24:54   

Hi Frans, Some time back i remember seeing a post where you have mentioned it is better to use Select columnName rather than select * in our queries. Could you tell me why this is an advantage/better thing?

Thanks.

wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 16-Aug-2004 17:33:21   

Im not frans, but i thought that i will drop in. wink

  1. Selecting the columns by name is better, as you only get the columns that you want - so this is better for performance purposes.

  2. By specifying the names also saves SQL the hassle of finding the columns names.

  3. If the SQL contains joins from other tables selecting Tbl.* is very bad as you can have name conflicts (Table with same field names) .

netLearner
User
Posts: 150
Joined: 18-Oct-2003
# Posted on: 16-Aug-2004 17:35:35   

Thanks Wayne. Appreciate it.