SQL adaptation guide For SQL SERVER 2005, 2008, 2012 / Data dictionary |
Both Informix® and Microsoft™ SQL SERVER support primary key, unique, foreign key, default and check constraints. But the constraint naming syntax is different: SQL SERVER expects the "CONSTRAINT" keyword before the constraint specification and Informix expects it after.
Informix | Microsoft SQL SERVER |
---|---|
CREATE TABLE emp( ... emp_code CHAR(10) UNIQUE [CONSTRAINT pk_emp], ... |
CREATE TABLE emp ( ... emp_code CHAR(10) [CONSTRAINT pk_emp] UNIQUE, ... |
The database interface does not convert constraint naming expressions when creating tables from BDL programs. Review the database creation scripts to adapt the constraint naming clauses for Microsoft SQL SERVER.
Before using a database, you must check the "ANSI NULL Default" option in the database properties if you want to have the same default NULL constraint as in Informix databases.