Migrating from Sybase to SQL Server - Optimizer Hints
(Page 3 of 4 )
SQL Server allows for optimizer hints on SELECT, INSERT, UPDATE, and DELETE statements. Sybase allows optimizer hints only on SELECT statements. Here’s the SQL Server vs. Sybase GUI approach:
| Sybase | SQL Server |
| Use a text-based query analysis tool called SHOWPLAN | Use Query Analyzer |
| Command to enable SHOWPLAN from within ISQL SET SHOWPLAN ONGO | Command to enable SHOWPLAN_ALL or SHOWPLAN_TEXT from query analyzer SET SHOWPLAN_ALLGO |
Temporary Table Names
| Type of table name | Maximum length |
| SQL Server table name | 128 |
| SQL Server temporary table name | 116 |
| Sybase table name | 30 |
| Sybase temporary table name | 13 |
Data Types| Data types | Sybase | SQL Server |
| char(n) | 255 | 8000 |
| varchar(n) | 255 | 8000 |
| nchar(n) | 255 | 4000 |
| nvarchar(n) | 255 | 4000 |
| binary | 255 | 8000 |
| varbinary | 255 | 8000 |
Notes:
1) The bit data type in SQL Server can be set to 0, 1, or NULL.
2) The bit data type in Sybase does not allow nulls.
Identity Columns
| Sybase | SQL Server |
| Numeric(x,0) | Tinyint,smallint,int,decimal(x,0) or numeric(x,0) |
Print Syntax
All PRINT statements that use substitution syntax must be changed to RAISERROR statements during the conversion process.
Next: Conclusion >>
More SQL Server Articles
More By Sayed Geneidy