Given:
Add a not-null constraint to a column:
To rename an existing constraint:
ALTER TABLE distributors RENAME CONSTRAINT zipchk TO zip_check;
ALTER TABLE distributors ALTER COLUMN street SET NOT NULL;
To Be:
Add a not-null constraint to a column:
ALTER TABLE distributors ALTER COLUMN street SET NOT NULL;
To rename an existing constraint:
ALTER TABLE distributors RENAME CONSTRAINT zipchk TO zip_check;
Page No : 969
Issue: Example misplaced.
Given: Add a not-null constraint to a column: To rename an existing constraint: ALTER TABLE distributors RENAME CONSTRAINT zipchk TO zip_check; ALTER TABLE distributors ALTER COLUMN street SET NOT NULL;
To Be: Add a not-null constraint to a column: ALTER TABLE distributors ALTER COLUMN street SET NOT NULL; To rename an existing constraint: ALTER TABLE distributors RENAME CONSTRAINT zipchk TO zip_check;