To perform this process just follow this,
Syntex:
Alter table <table_Name>
Add column <column_Name> null/not null default
Query:
let say user table has column username,password. now i am adding createdon(date), to achieve this
Alter table user
add column createdon null default(getdate())
Result:
along with existing data new column will added as well as value also.
happy coding :)
Syntex:
Alter table <table_Name>
Add column <column_Name> null/not null default
Query:
let say user table has column username,password. now i am adding createdon(date), to achieve this
Alter table user
add column createdon null default(getdate())
Result:
along with existing data new column will added as well as value also.
happy coding :)