I may have misled you a bit. Every tip so far, and probably in the future too, has exceptions.

  • SELECT * is bad….. unless you don’t know what’s in the table yet…
  • Every table should have a clustered index and primary key….. unless it’s temporary table…
  • Scans are better than seeks….. unless you want a lot of ordered data…

As our topics grow more complex, the space for exceptions to the rules will grow larger. Most things you encounter should follow these rules, but hey.. It depends.