Check out example codes for "alter table add default sql". It will help you in understanding the concepts better.

Code Example 1

Name Varchar(255) default "Fred"

Code Example 2

CREATE TABLE Persons
(

    ID int NOT NULL,

   
LastName varchar(255) NOT NULL,

   
FirstName varchar(255),

   
Age int,

   
City varchar(255) DEFAULT 'Sandnes'

);

Code Example 3

// For SQL Server

ALTER TABLE Persons
ADD CONSTRAINT df_City
DEFAULT 'Sandnes' FOR City;

Learn ReactJs, React Native from akashmittal.com