User's Guide
PART 5. The Adaptive Server Family
CHAPTER 30. Transact-SQL Compatibility
When writing SQL that will be used on more than one database management system, you should be as explicit as possible in your SQL statements. Even if a given SQL statement is supported by more than one server, it may be a mistake to assume that default behavior when an option is not specified is the same on each system. The following general guidelines apply when writing compatible SQL:
Spell out all of the available options, rather than using default behavior.
Make the order of execution within statements explicit using parentheses, rather than assuming identical default order of precedence for operators.
Use the Transact-SQL convention of an @ sign preceding variable names for Adaptive Server Enterprise portability.
In procedures, triggers, and batches, declare variables and cursors immediately following a BEGIN statement. This is required by Adaptive Server Anywhere, although Adaptive Server Enterprise allows declarations to be made anywhere in a procedure, trigger, or batch.
Avoid using reserved words from either Adaptive Server Enterprise or Adaptive Server Anywhere as identifiers in your databases.