In SQL Anywhere, the database server and the SQL preprocessor (sqlpp) can identify SQL statements that are vendor extensions, are non-compliant with respect to a specific ISO/ANSI SQL standard, or are not supported by UltraLite. This functionality is called the SQL Flagger, and is part of the SQL/1999 and SQL/2003 ISO/ANSI SQL standards. The SQL Flagger helps an application developer to identify SQL language constructs that violate a specified subset of the SQL language. The SQL Flagger can also be used to ensure compliance with core features of a SQL standard, or compliance with a combination of core and optional features. The SQL Flagger can also be used when prototyping an UltraLite application with SQL Anywhere, to ensure that the SQL being used is supported by UltraLite.
The SQL Flagger is intended to provide static, compile-time checking of compliance, although both syntactic and semantic elements
of a SQL statement are candidates for analysis by the SQL Flagger. An example test of syntactic compliance is the lack of
the optional INTO keyword in an INSERT statement (for example, INSERT Products VALUES( ... )
), which is a SQL Anywhere grammar extension to the SQL language. The use of an INSERT statement without the INTO keyword
is flagged as a vendor extension because the ANSI SQL/2003 standard mandates the use of the INTO keyword. Note, however, that
the INTO keyword is optional for UltraLite applications.
Key joins are also flagged as a vendor extension. A key join is used by default when the JOIN keyword is used without an ON clause. A key join uses existing foreign key relationships to join the tables. Key joins are not supported by UltraLite. For example, the following query specifies an implicit join condition between the Products and SalesOrderItems tables. This query is flagged by the SQL Flagger as a vendor extension.
SELECT * FROM Products JOIN SalesOrderItems; |
SQL Flagger functionality is not dependent on the execution of a SQL statement; all flagging logic is done only as a static, compile-time process.
Invoking the SQL Flagger
Standards and compatibility
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |