Contents IndexChapter 31.  Transact-SQL Procedure Language Automatic translation of SQL statements

User's Guide
   Part IV. Transact-SQL Compatibility
     Chapter 31. Transact-SQL Procedure Language
      Transact-SQL procedure language overview

The previous chapter described SQL Anywhere support for individual SQL statements. This chapter describes the SQL Anywhere support for sets of SQL statements, whether they appear as stored procedures, triggers, or batches. Also discussed in this chapter are individual statements that are typically found within stored procedures, such as variable assignment statements, as well as control-of-flow statements such as IF and WHILE, and compound statements (bracketed by BEGIN and END). Collectively, these aspects of SQL are called the procedure language.

This chapter describes how the two dialects of SQL coexist in SQL Anywhere, and describes the SQL Anywhere functions for automatic translation of Transact-SQL procedures. The chapter also provides reference for the individual statements that make up the Transact-SQL procedure language.

Top of page


Mixing Transact-SQL and Watcom-SQL dialects

SQL Anywhere supports two SQL dialects: the native Watcom-SQL and Sybase Transact-SQL. There is a large overlap between the two dialects: SELECT * FROM employee is a SQL statement that is part of both Watcom-SQL and Transact-SQL.

Transact-SQL only

There are SQL statements supported by SQL Anywhere that are part of one dialect, but not the other. For example: the following are part of the Transact-SQL dialect only:

Watcom-SQL only

The following statements are part of the Watcom-SQL dialect only:

Notes

The two dialects cannot be mixed within a procedure, trigger, or batch. That is:

Top of page


Contents IndexChapter 31.  Transact-SQL Procedure Language Automatic translation of SQL statements