Testing SQL 99 compliance

Last updated on
8 September 2016

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Writing SQL-99 compliant code is highly recommended. Mimer validator allows to test SQL-99 compliance online. Writing SQL 99 code ensures that your code is portable against several databases.

In some aspects, PostgreSQL is considered a reference database for SQL-99 programming. It supports most SQL-99 syntax. Visit SQL conformance PostgreSQL documentation page for the detailed list of supported and unsupported features.

MySQL also offers an ANSI mode, which complies with standards. Drupal 7 will require MySQL to run in ANSI mode. SQL-99 compliance is therefore getting better over releases. Read http://dev.mysql.com/doc/refman/5.0/en/compatibility.html

A lot of SQL extensions are supported by PostgreSQL, MySQL and nearly all database systems, making it difficult to understand what is part of standard compliant SQL programming and what is not.

Drupal provides a database abstraction layer, so in most cases accessing data is transparent. For example, you will not need to define types in SQL language. This will be handled by Drupal.

In the next pages, we will present a clean list of what should be avoided and make recommendations. This manual will take some time writing, please be patient.

Help improve this page

Page status: No known problems

You can: