Even if more than one server supports a given SQL statement, it might be a mistake to assume that default behavior is the same on each system.
General guidelines applicable to writing compatible SQL include:
When writing SQL for use on more than one database management system, make your SQL statements as explicit as possible.
Spell out all of the available options, rather than using default behavior.
Use parentheses to make the order of execution within statements explicit, 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.
Declare variables and cursors in procedures and batches immediately following a BEGIN statement. Sybase IQ requires this, although Adaptive Server Enterprise allows declarations to be made anywhere in a procedure or batch.
Do not use reserved words from either Adaptive Server Enterprise or Sybase IQ as identifiers in your databases.