Class TConstraint

Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TConstraint
All Implemented Interfaces:
Visitable, Iterator<TSourceToken>

public class TConstraint extends TParseTreeNode
Use a constraint to define an integrity constraint, a rule that restricts the values in a database.

Oracle Database lets you create six types of constraints and lets you declare them in two ways.

  • A NOT NULL constraint prohibits a database value from being null.
  • A 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. call method getColumnList() to result columns of this unique key.
  • A primary key constraint combines a NOT NULL constraint and a unique constraint in a single declaration. It prohibits multiple rows from having the same value in the same column or combination of columns and prohibits values from being null. call method getColumnList() to result columns of this primary key.
  • A foreign key constraint requires values in one table to match values in another table. call method getColumnList() to result columns of this foreign key.
  • A check constraint requires a value in the database to comply with a specified condition. call method getCheckCondition() to return this condition.
  • A REF column by definition references an object in another object type or in a relational table. A REF constraint lets you further describe the relationship between the REF column and the object it references.
  • default constraint is valid in sql server.
See Also: