Validating Column Values

There are a variety of ways you can validate column values.

insert interacts with the ignore_dup_key, ignore_dup_row, and allow_dup_row options, which are set with the create index command.

A rule or check constraint can restrict the domain of legal values that can be entered into a column. Rules are created with the create rule command and bound with sp_bindrule. check constraints are declared with create table.

A default can supply a value if you do not explicitly enter one. Defaults are created with the create default command and bound with sp_bindefault, or they are declared with create table.

If an insert statement violates domain or integrity rules (see create rule and create trigger), or if it is the wrong datatype (see create table and System and User-Defined Datatypes in Reference Manual: Building Blocks), the statement fails, and the SAP ASE server displays an error message.

See create index for more information.