![]() You can define constraints syntactically in two ways:Īs part of the definition of an individual column or attribute. A REF constraint lets you further describe the relationship between the REF column and the object it references. It prohibits multiple rows from having the same value in the same column or combination of columns and prohibits values from being null.Ī foreign key constraint requires values in one table to match values in another table.Ī check constraint requires a value in the database to comply with a specified condition.Ī REF column by definition references an object in another object type or in a relational table. ![]() The six types of integrity constraint are described briefly here and more fully in "Semantics":Ī NOT NULL constraint prohibits a database value from being null.Ī unique constraint prohibits multiple rows from having the same value in the same column or combination of columns but allows some values to be null.Ī primary key constraint combines a NOT NULL constraint and a unique constraint in a single declaration. Oracle Database lets you create six types of constraints and lets you declare them in two ways. Use a constraint to define an integrity constraint-a rule that restricts the values in a database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |