Collection Contents Index CHAPTER 30.  Transact-SQL Compatibility Adaptive Server architectures pdf/chap30.pdf

User's Guide
   PART 5. The Adaptive Server Family
     CHAPTER 30. Transact-SQL Compatibility       

An overview of Transact-SQL support


Adaptive Server Anywhere supports a large subset of Transact-SQL, which is the dialect of SQL supported by Sybase Adaptive Server Enterprise. This chapter describes compatibility of SQL between Anywhere and Enterprise.

Goals 

The goals of Transact-SQL support in Adaptive Server Anywhere are as follows:

The aim is to make it possible to write applications to work with both Enterprise and Anywhere. Existing Adaptive Server Enterprise applications will generally require some changes to run on a Anywhere database.

How Transact-SQL is supported 

Transact-SQL support in Anywhere takes the following form:

The following diagram illustrates how the two dialects overlap.

Similarities and differences 

Adaptive Server Anywhere supports a very high percentage of Transact-SQL language elements, functions, and statements for working with existing data. For example, all of the numeric functions are supported, all but one of the string functions are supported, all aggregate functions are supported, and all date and time functions are supported. As another example, Adaptive Server Anywhere supports Transact-SQL outer joins (using =* and *= operators) and extended DELETE and UPDATE statements using joins.

Further, a very high percentage of the Transact-SQL stored procedure language is supported (CREATE PROCEDURE and CREATE TRIGGER syntax, control statements, and so on), and many but not all aspects of Transact-SQL data definition language statements are supported.

There are design differences in the architectural and configuration facilities supported by each product. Device management, user management, and maintenance tasks such as backups tend to be system-specific. Even here, Transact-SQL system tables are provided in Adaptive Server Anywhere as views, where the tables that are not meaningful in Adaptive Server Anywhere have no rows. Also, a set of system procedures is provided for some of the more common administrative tasks.

This chapter looks first at some system-level issues where differences are most marked, before discussing data manipulation and data definition language aspects of the dialects where compatibility is high.

Transact-SQL only 

There are SQL statements supported by Adaptive Server Anywhere that are part of one dialect, but not the other. The two dialects cannot be mixed within a procedure, trigger, or batch. For example: the following are supported in Adaptive Server Anywhere, but as part of the Transact-SQL dialect only:

Adaptive Server Anywhere only 

The following statements are among those not supported in Adaptive Server Enterprise:

Notes 

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


Collection Contents Index CHAPTER 30.  Transact-SQL Compatibility Adaptive Server architectures pdf/chap30.pdf