Variants of SQL
Tailoring the SQL to suit best the OS and DBMS
Every vendor has come up with a version of SQL that is tailored to their particular DBMS and the Operating System on which their DBMS runs best. Each vendor's version of SQL may contain special features, enhancements or extensions. For example, most vendors offer a field type that automatically increments every time a new record is inserted - this is not described in the SQL standards. One vendor's additions will not work on a competitor's RDBMS. It is always safest to stick to pure SQL whenever possible; otherwise, your code may not run on another DBMS. Take a look at the following table to get an idea about the differences between the SQL Server DBMS's Transact SQL and Oracle's PL/SQL.
|
Feature |
PL/SQL |
T-SQL |
|
Indexes |
B-Tree indexes, |
B-Tree indexes |
|
Tables |
Relational tables, |
Relational tables, |
|
Triggers |
BEFORE triggers, |
AFTER triggers, |
|
Procedures |
PL/SQL statements, |
T-SQL statements |
|
Arrays |
Supported |
Not Supported |
Table 4c: Features - T-SQL vs PL/SQL