Flavors of SQL
There are different versions (or flavors) of SQL. Some of the best known are SQL Server, PostgreSQL, Oracle, MySQL, and SQLite
The computer industry (like most industries) both benefits and suffers from standards. We said that SQL is an open standard, not owned by a company, and the standard comes from ANSI. Therefore, the SQL standard from ANSI is considered the “pure” SQL and called ANSI-SQL
.
Two problems emerge to sully this pureness.
First is that every DBMS vendor wants to differentiate their DBMS products.
So if we look at the feature set of each DBMS product we see that not only does the product support ANSI-SQL but, it also offers extra features, enhancements or extensions that are available only from individual vendors.
Example
For example, most vendors offer a field type which auto- increments even though this is not described in the SQL standards.
These additions to ANSI-SQL are generally proprietary and will not work if we try to use them on competitor’s SQL products.
Many of these features are powerful and robust, but since they vary from vendor to vendor, programmers should use them with caution. It is always safest to stick with pure SQL whenever possible, if we stray it should be with full knowledge that we are losing the portability of our statements (and perhaps even our data).
Such enhancements are not all bad because these extensions are very useful.
Example
For example, ANSI-SQL does not contain an automatic way to assign a serial number to each new record but most DBMS sold today have added this feature.
Since serial numbering is so common programmers are happy to have the enhancement.
However, the method of implementation is not uniform, so code written to get the serial number from data in one DBMS may not work when used with another vendor’s DBMS.