See the discussion on the dev list:
Is "SELECT * FROM ..." ok?
http://lists.drupal.org/pipermail/development/2009-February/thread.html#...

It seems there was a small consensus to discourage the use of SELECT * FROM ... in SQL queries.
However, I counted 120 such queries in Drupal 6, and close to 150 in Drupal 7.

This issue is about consolidating the consensus and defining better the SQL coding standard:
http://drupal.org/node/374660

It is posted in the Drupal issue queue for two reasons:
1) It is a coding standard that will affect primarily Drupal core (the code).
2) The best would be to use actual examples from Drupal core to see how related queries ought to be changed.

Comments

Crell’s picture

For the record I support discouraging the use of SELECT * except where really necessary. Spelling out the fields is much more self-documenting.

lilou’s picture

Issue tags: +Coding standards

Add tag.

Crell’s picture

Status: Active » Fixed

Given the lack of additional feedback, I've confirmed this standard in the handbook. Closing this issue.

Status: Fixed » Closed (fixed)
Issue tags: -Coding standards

Automatically closed -- issue fixed for 2 weeks with no activity.