By default, Sybase does not evaluate NULL values in SQL equality (=), inequity (<>), or aggregate function comparisons in an ANSI SQL-compliant manner. For example, the ANSI SQL specification defines that col1=NULL always evaluates to false:Setting ansinull to on changes the default database behavior so that SQL statements must use IS NULL instead of =NULL. For example, using the Sybase Wire Protocol driver, if the value of col1 in the following statement is NULL, the comparison evaluates to true:
• Use the Initialization String option to specify the SQL command set ANSINULL off. For example, the following connection string ensures that the handling of NULL values is restored to the Sybase default for the current connection:
![]() |
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |