Progress
Embedded SQL-92
Guide and Reference


Types of Integrity Constraints

These are the types of integrity constraints:

Optionally, you can name an integrity constraint, and refer to that name in other SQL-92 statements. The database assigns a constraint name if you do not specify one. Typically, application-defined constraint names are easier to manage. Database-defined names can be long, unwieldy, and might require look-up in a system catalog.

EXAMPLE

The following code fragment shows the specification of a table constraint named prim_constr on the supplier_item table. You specify a constraint name with the CONSTRAINT keyword:

EXEC SQL 

CREATE TABLE supplier_item (

supp_no INTEGER NOT NULL,

item_no INTEGER NOT NULL,

qty INTEGER NOT NULL DEFAULT 0

CONSTRAINT prim_constr

PRIMARY KEY (supp_no, item_no)

) ;


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095