Editorials

Using ANSI SQL

Some time ago I was demonstrating to a colleague how to locate databases containing a column with a specific name and type. I was using the INFORMATION_SCHEMA views in order to find the column instances. I was asked, “Are you using INFORMATION_SCHMA? Isn’t that deprecated?” My response was simple…this is an ANSI standard, and it works accurately and efficiently.

Years ago when we so strongly aligned to specific products using Two Tiered development techniques I would have been less shocked. Today, with the ability and propensity to change data engines, or at least a desire to do so, it seems to me a useful skill to know how to access a database in a standardized manner that meets your goals.

Don’t get me wrong. I use the system DMVs a LOT. I have many different maintenance tasks for defragmenting, identifying missing statistics or indexes, slow performing queries and the like. I even have code that is based on the exposed schema of system table for identifying things such as scheduled jobs that have failed. This is completely non-transportable. But, it need not be, because the things I am doing only apply to an MS world in the first place.

What should we then do? Do we give up the ANSI standardized ways of doing things and only use proprietary techniques? Should we use the ones that are the easiest to get the job done? Should we stick with only one product and become the guru of its uniqueness?

Get into the conversation by sharing your opinion. Leave something here online, or drop an email to btaylor@sswug.org.

Cheers,

Ben