What Is DEFAULT Constraint in SQL ?

Forums SQLWhat Is DEFAULT Constraint in SQL ?
Staff asked 2 years ago

Answers (1)

Add Answer
Staff answered 2 years ago

The DEFAULT constraint is used to set a default value for a column.

The default value will be added to all new records if no other value is specified

Example:

ALTER TABLE Persons
ALTER City SET DEFAULT ‘Surat’;

Subscribe

Select Categories