SQL Funny

Below is something which really made me chuckle when browsing a Business Intelligence providers website.

Absolutely no malice is meant here, hence me not naming the website in question, but it just made me chuckle to see them offering SQL expertise while showing a screenshot of a VB or C# (not my area of expertise) script executing a SELECT * FROM SQL statement.

Now we all know that rarely, if ever should a SQL expert be writing SELECT * queries, especially if that query is being executed as part of a parent application which will surely be expecting a consistent result set from SQL.


So remember folks, when querying SQL server, it’s best practice to provide actual column names, even if you really do need every column, if only to prevent your application / reports from falling over the moment a new column is added, or existing columns are re-ordered.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s