Example of DEFAULT constraint creation in SQL server-
CREATE TABLE Students (
ID INT NOT NULL UNIQUE,
FirstName VARCHAR(200),
Fees INT,
City VARCHAR(200) DEFAULT ‘Delhi’
);
Example to create DEFAULT constraint on existing table in SQL server-
ALTER TABLE Students
ADD CONSTRAINT d_city DEFAULT ‘Delhi’ FOR City;
Example to DROP a UNIQUE constraint in SQL server –
ALTER TABLE Students
ALTER COLUMN City DROP DEFAULT;