Default Constraint :–
- This is to provide default value for a column.
- When user doesn’t provide any value then sql server inserts default value.
Declaration :
- Create table emp88 (eno int, Ename varchar(20), Doj date time default getdate())
- Insert into emp88 values (1,’a’,16-oct-09)
- Insert into emp88 values (2,’B’,17-oct-09)
Default <– Insert into emp88 (eno,ename) values (3,’B’)