CHAPTER 7 Ensuring Data Integrity
281
•
You can replace a CHECK condition on a column in the same way as you
would add a CHECK condition. The following statement adds or replaces
an unenforced CHECK condition on the
phone
column of the
customer
table:
ALTER TABLE customer
MODIFY phone
CHECK ( phone LIKE ’___-___-____’ )
UNENFORCED
There are two ways of modifying a CHECK condition defined on the table, as
opposed to a CHECK condition defined on a column.
•
You can add a new CHECK condition using ALTER TABLE with an ADD
table-constraint clause.
•
You can delete all existing CHECK conditions, including column CHECK
conditions, using ALTER TABLE DELETE CHECK, and then add in new
CHECK conditions.
All CHECK conditions on a table, including CHECK conditions on all its
columns and CHECK conditions inherited from user-defined data types, are
removed using the ALTER TABLE statement with the DELETE CHECK
clause, as follows:
ALTER TABLE table_name
DELETE CHECK
Deleting a column from a table does not delete CHECK conditions associated
with the column that are held in the table constraint. If the constraints are not
removed, any attempt to query data in the table will produce a column not
found error message.
Declaring entity and referential integrity
The relational structure of the database enables the database server to identify
information within the database. Adaptive Server IQ also ensures that primary
key-foreign key relationships between tables are properly upheld by all the
rows in any join index relying on these relationships.
Содержание Adaptive Server IQ 12.4.2
Страница 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Страница 16: ...xvi ...
Страница 20: ...Related documents xx ...
Страница 40: ...Compatibility with earlier versions 20 ...
Страница 118: ...Troubleshooting startup shutdown and connections 98 ...
Страница 248: ...Importing data by replication 228 ...
Страница 306: ...Integrity rules in the system tables 286 ...
Страница 334: ...Cursors in transactions 314 ...
Страница 396: ...Users and permissions in the system tables 376 ...
Страница 438: ...Determining your data backup and recovery strategy 418 ...
Страница 484: ...Network performance 464 ...
Страница 500: ...System utilities to monitor CPU use 480 ...
Страница 514: ...Characteristics of Open Client and jConnect connections 494 ...
Страница 536: ...Index 516 ...