set default value in sql select query
snippet in sql

alter table add column with default value

user7469

ALTER TABLE Protocols
ADD ProtocolTypeID int NOT NULL DEFAULT(1)

set default value in sql select query

user4604


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

set default value sql

user5150


CREATE TABLE Persons
(

    ID int NOT NULL,

   
LastName varchar(255) NOT NULL,

   
FirstName varchar(255),

   
Age int,

   
City varchar(255) DEFAULT 'Sandnes'

);